-
-
Save nkpro2000/c5c4400dd084e9934a9c8fde3348bd82 to your computer and use it in GitHub Desktop.
Just to download pkgbuild files of all packages in AUR
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
#!/bin/sh | |
get () { | |
curl 'https://aur.archlinux.org/packages?PP=2500&SB=n&O='"$(echo "($1 - 1) * 2500" |bc)" > "$1.html" | |
grep -oP --color '(?<="/packages/)[^"]+(?=")' "$1.html" > "$1.list" | |
} | |
if test -n "$2"; then | |
for i in $(seq "$1" "$(qalc -t "ceil ($2 / 2500)")"); do | |
get "$i" | |
done | |
else | |
get "$1" | |
fi |
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
#!/bin/sh | |
get_pkgbuild () { | |
curl 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h='"$2" > "$1/$2" | |
} | |
mkdir -p "$1" | |
for i in $(cat "$1.list"); do | |
get_pkgbuild "$1" "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment