Created
May 8, 2018 11:08
-
-
Save endreszabo/86f17ecdd7d791099dd07a460403d9ae to your computer and use it in GitHub Desktop.
Make your very own archzfs-tied kernels Arch Linux repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -x | |
set -o nounset | |
set -o errexit | |
curl http://archzfs.com/archzfs/x86_64/archzfs.db | tar xJvf - | |
cat */desc | perl -e'while(<>) { | |
if (m/^%DEPENDS/) { | |
while(<>) { | |
chomp; | |
last if $_ eq ""; | |
m/linux.*=/ && $p{$_}++} | |
} | |
}; | |
foreach my $a (keys %p) { | |
$a=~s/((.).*)=(.*)/https:\/\/archive.archlinux.org\/packages\/$2\/$1\/$1-$3-x86_64.pkg.tar.xz/; | |
print "$a\n$a.sig\n"; | |
}' > kernels.txt | |
rm -r zfs-*/ spl-*/ | |
wget -i kernels.txt -nc -o kernels.log | |
repo-add archzfs-kernels.db.tar.xz *tar.xz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obviously it won't clean up old kernel packages that will eventually fill up your multi-zettabyte storages.