summaryrefslogtreecommitdiff
path: root/aur.sh
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2023-01-12 01:00:38 +0100
committerbozo.kopic <bozo@kopic.xyz>2023-01-12 01:00:38 +0100
commit5c76c8ab23ba5ca51a4bc85e89c4d7bec6663087 (patch)
tree9bed9cbcd9a7182964a9ab26df50ba152c97706d /aur.sh
parente9869fce898d7e8ad7c739bf98e89bd553e90feb (diff)
.
Diffstat (limited to 'aur.sh')
-rwxr-xr-xaur.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/aur.sh b/aur.sh
new file mode 100755
index 0000000..edb70ca
--- /dev/null
+++ b/aur.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+PACKAGES="opcut
+ python-hat-aio
+ python-hat-doit
+ python-hat-json
+ python-hat-util"
+
+cd $(dirname -- "$0")
+
+mkdir -p aur
+
+for PACKAGE in $PACKAGES; do
+
+ echo -n "$PACKAGE... "
+
+ if [ -d aur/$PACKAGE ]; then
+ git -C aur/$PACKAGE pull -q
+ else
+ 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
+ fi
+ done
+
+ (cd aur/$PACKAGE; makepkg --printsrcinfo > .SRCINFO)
+
+ if git -C aur/$PACKAGE diff --quiet; then
+ echo "OK"
+ else
+ echo "CHANGED"
+ fi
+
+done