Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-15 10:03:17 +0200
committerErich Eckner <git@eckner.net>2018-05-15 10:03:17 +0200
commite39e8c4831f6016344de8448b193c16dad68ba8b (patch)
treefeea696a3781cfc16385086bf36efefae758eb7e /bin/build-packages
parent7b09ca326731653be4d8baa54be133de1e31a550 (diff)
bin/build-packages: do not start new builds if the script changed
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/build-packages b/bin/build-packages
index a930005..52f33d8 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -162,7 +162,14 @@ if [ "${timeout}" -ne 0 ]; then
timeout=$((timeout+$(date +%s)))
fi
-while [ "${count}" -ne 0 ]; do
+checksum=$(
+ calculate_script_checksum
+)
+
+# When this script or a script in lib/ got updated, we do not request
+# any new assignments. This script should rather exit and be restarted.
+while [ "${count}" -ne 0 ] && \
+ [ "$(calculate_script_checksum)" = "${checksum}" ]; do
if [ "${timeout}" -ne 0 ] && [ "${timeout}" -lt "$(date +%s)" ];
then