Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contrib aur scripts #71

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ TAG = $(shell git describe --abbrev=0 --tags)
BASH_SCRIPTS = \
admin/checkservices \
aur/review \
aur/repos2aur \
package/parse-submodules \
package/pkgsearch \
package/rebuild-todo
Expand Down
42 changes: 0 additions & 42 deletions aur/repos2aur

This file was deleted.

20 changes: 14 additions & 6 deletions aur/review
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
# Default: fetches all packages and reviews them.

fetch(){
pkgs=$(curl -s "https://aur.archlinux.org/rpc/?v=5&type=search&search_by=maintainer&arg=$1" | jq -r '.results[].PackageBase' | sort -u)
pkgs=$(curl -s "https://aur.archlinux.org/rpc/?v=5&type=search&by=maintainer&arg=$1" | jq -r '.results[].PackageBase' | sort -u)

if [[ -z ${pkgs} ]]; then
printf "no packages found for %s\n" "$1"
exit 1
fi

for pkg in $pkgs; do
printf "===> Downloading %s...\n" "$pkg"
curl -s "https://aur.archlinux.org/cgit/aur.git/snapshot/$pkg.tar.gz" | tar xzm
Expand All @@ -25,8 +31,10 @@ review(){
done
}

case "$@" in
fetch) shift; fetch "$@" ;;
review) shift; review "$@" ;;
*) shift; fetch "$@"; review "$@" ;;
esac
while (( $# )); do
case "$1" in
fetch) shift; fetch "$@" ; exit 0;;
review) shift; review "$@" ; exit 0;;
*) fetch "$@" && review "$@" ;;
esac
done
Loading