From b7e2e1ec6f66af9619037f81122d6ee790c7de10 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 12 Jun 2023 12:26:20 +0200 Subject: build-packages: added a -e parameter for endless self-execution --- bin/build-packages | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/build-packages b/bin/build-packages index 7a5a541..12821f0 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -62,6 +62,8 @@ usage() { >&2 echo ' Cannot be combined with -l.' >&2 echo ' -x: If package build fails, do not request new assignment(s).' >&2 echo ' Cannot be combined with -l.' + >&2 echo ' -e: Run in an endless loop (careful, not all processes might get killed' + >&2 echo ' after every finished run!).' >&2 echo '' >&2 echo 'known straws (separated by and enclosed in ":", sets of straws separated by " "):' >&2 echo ' :clean_chroot:' @@ -99,6 +101,7 @@ unset forced_package unset forced_straws unset prefered_package exit_after_failure=false +endless=false timeout=0 while true @@ -140,6 +143,9 @@ do -x) exit_after_failure=true ;; + -e) + endless=true + ;; --) shift break @@ -1131,3 +1137,9 @@ if ! ${i_am_the_master}; then fi >&2 echo 'Done.' + +# simple endless loop +if [ ${endless} ]; then + sleep 10 + exec "$0" "$@" +fi -- cgit v1.2.3-70-g09d2