summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParabola git <git@parabola.nu>2020-11-12 06:00:01 +0000
committerParabola git <git@parabola.nu>2020-11-12 06:00:01 +0000
commit5488a5d2f8f04b32660c14d64cbb45c299393ea2 (patch)
treeec89dae4d435612a85747b260592ff94b34300b8
parent8bbdc0baf4b04c69143159fb62dc751fc25e558e (diff)
Update from cron
-rwxr-xr-xabslibre/abslibre.git/hooks/commit-msg18
1 files changed, 11 insertions, 7 deletions
diff --git a/abslibre/abslibre.git/hooks/commit-msg b/abslibre/abslibre.git/hooks/commit-msg
index b46ace0..30a4595 100755
--- a/abslibre/abslibre.git/hooks/commit-msg
+++ b/abslibre/abslibre.git/hooks/commit-msg
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
-readonly REBUILD_PKGS=(
- libre/lxappearance-obconf-gtk3
-)
+#readonly REBUILD_PKGS=(
+# libre/lxappearance-obconf-gtk3
+#)
# rebuild/sign per autobuilder
@@ -11,8 +11,12 @@ readonly REBUILD_PKGS=(
#do echo '==> Rebuilding ${pkg} ...'
# ~autobuilder/.local/bin/autobuild ${pkg}
#done
-echo '==> Rebuilding ${pkg} ...'
-if [[ "$1" =~ ^\[([^/]*/([^/]*)\]: autobuild$ ]]
-then ~autobuilder/.local/bin/autobuild ${pkg}
+commit_msg_file="$@"
+if [[ "$(cat ${commit_msg_file})" =~ ^\[([^/]*/[^/]*)\]: *autobuild$ ]]
+then pkg=${BASH_REMATCH[1]}
+ if git ls-tree --name-only -r master | grep "${pkg}/PKGBUILD"
+ then echo '==> Rebuilding ${pkg} ...'
+ ~autobuilder/.local/bin/autobuild ${pkg}
+ exit 1
+ fi
fi
-