
1 changed files with 0 additions and 35 deletions
@ -1,35 +0,0 @@
|
||||
#!/bin/bash |
||||
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} |
||||
AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/$argv0} |
||||
AUR_LOCATION=${AUR_LOCATION:-https://aur.archlinux.org} |
||||
|
||||
get_package() { |
||||
if git ls-remote --exit-code "$AUR_LOCATION/$1"; then |
||||
aur fetch "$1" |
||||
|
||||
elif pkgbase=$(aur query -t info "$1" | jq -er '.results[].PackageBase'); then |
||||
aur fetch "$pkgbase" |
||||
|
||||
elif asp update "$1"; then |
||||
asp export "$1" |
||||
fi |
||||
} |
||||
|
||||
if cd "$AURDEST"; then |
||||
while read -r repo pkg; do |
||||
if [[ ! -d $pkg ]]; then |
||||
get_package "$pkg" |
||||
fi |
||||
|
||||
if cd "$AURDEST/$pkg" && [[ -f PKGBUILD ]]; then |
||||
if setconf PKGBUILD "pkgrel+=0.1"; then |
||||
aur build -d "$repo" --remove "$@" |
||||
fi |
||||
else |
||||
printf >&2 '%s: invalid argument\n' "$pkg" |
||||
exit 22 |
||||
fi |
||||
done < <(checkrebuild) |
||||
else |
||||
exit 1 |
||||
fi |
Loading…
Reference in new issue