summaryrefslogtreecommitdiff
path: root/aur.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aur.sh')
-rwxr-xr-xaur.sh32
1 files changed, 14 insertions, 18 deletions
diff --git a/aur.sh b/aur.sh
index a9a49c6..a09a7d0 100755
--- a/aur.sh
+++ b/aur.sh
@@ -2,37 +2,33 @@
set -e
-PACKAGES="hat-syslog
- opcut
- python-hat-aio
- python-hat-doit
- python-hat-json
- python-hat-juggler
- python-hat-util"
-
cd $(dirname -- "$0")
+packages="$(find . -mindepth 2 -maxdepth 2 -type f -name PKGBUILD | \
+ xargs -I {} dirname {} | \
+ xargs -I {} basename {})"
+
mkdir -p aur
-for PACKAGE in $PACKAGES; do
+for package in $packages; do
- echo -n "$PACKAGE... "
+ echo -n "$package... "
- if [ -d aur/$PACKAGE ]; then
- git -C aur/$PACKAGE pull -q
+ if [ -d aur/$package ]; then
+ git -C aur/$package pull -q
else
- git -C aur clone -q ssh://aur@aur.archlinux.org/$PACKAGE.git
+ git -C aur clone -q ssh://aur@aur.archlinux.org/$package.git
fi
- for SRC in $(find $PACKAGE -type f -a -not -name .gitignore); do
- if ! git check-ignore -q $SRC; then
- cp $SRC aur/$SRC
+ for src in $(find $package -type f -a -not -name .gitignore); do
+ if ! git check-ignore -q $src; then
+ cp $src aur/$src
fi
done
- (cd aur/$PACKAGE; makepkg --printsrcinfo > .SRCINFO)
+ (cd aur/$package; makepkg --printsrcinfo > .SRCINFO)
- if git -C aur/$PACKAGE diff --quiet; then
+ if git -C aur/$package diff --quiet; then
echo "OK"
else
echo "CHANGED"