Skip to content

Commit 4f03123

Browse files
Merge pull request #71 from archlinux/contrib-aur-scripts
Contrib aur scripts
2 parents 5ffbe6f + 1a76404 commit 4f03123

File tree

3 files changed

+14
-49
lines changed

3 files changed

+14
-49
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ TAG = $(shell git describe --abbrev=0 --tags)
77
BASH_SCRIPTS = \
88
admin/checkservices \
99
aur/review \
10-
aur/repos2aur \
1110
package/parse-submodules \
1211
package/pkgsearch \
1312
package/rebuild-todo

aur/repos2aur

Lines changed: 0 additions & 42 deletions
This file was deleted.

aur/review

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
# Default: fetches all packages and reviews them.
99

1010
fetch(){
11-
pkgs=$(curl -s "https://aur.archlinux.org/rpc/?v=5&type=search&search_by=maintainer&arg=$1" | jq -r '.results[].PackageBase' | sort -u)
11+
pkgs=$(curl -s "https://aur.archlinux.org/rpc/?v=5&type=search&by=maintainer&arg=$1" | jq -r '.results[].PackageBase' | sort -u)
12+
13+
if [[ -z ${pkgs} ]]; then
14+
printf "no packages found for %s\n" "$1"
15+
exit 1
16+
fi
17+
1218
for pkg in $pkgs; do
1319
printf "===> Downloading %s...\n" "$pkg"
1420
curl -s "https://aur.archlinux.org/cgit/aur.git/snapshot/$pkg.tar.gz" | tar xzm
@@ -25,8 +31,10 @@ review(){
2531
done
2632
}
2733

28-
case "$@" in
29-
fetch) shift; fetch "$@" ;;
30-
review) shift; review "$@" ;;
31-
*) shift; fetch "$@"; review "$@" ;;
32-
esac
34+
while (( $# )); do
35+
case "$1" in
36+
fetch) shift; fetch "$@" ; exit 0;;
37+
review) shift; review "$@" ; exit 0;;
38+
*) fetch "$@" && review "$@" ;;
39+
esac
40+
done

0 commit comments

Comments
 (0)