From e39e8c4831f6016344de8448b193c16dad68ba8b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 15 May 2018 10:03:17 +0200 Subject: bin/build-packages: do not start new builds if the script changed --- bin/build-packages | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2