index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-01-31 09:34:56 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-31 09:44:57 +0100 |
commit | b2554880deb779f50aa82e73b247edf3a63b8837 (patch) | |
tree | 05003f4f29c58d03e92af987444f9280291e78ce /lib/intentions-queue | |
parent | 8048b29f90d956a295349d03ab91dcbd23106d34 (diff) |
-rwxr-xr-x | lib/intentions-queue | 11 |
diff --git a/lib/intentions-queue b/lib/intentions-queue index e9b79de..c92a4d1 100755 --- a/lib/intentions-queue +++ b/lib/intentions-queue @@ -68,11 +68,18 @@ execute_intention() { "${intentions_directory}/intention.${next_number}" } -# intentions_left +# intentions_left [-n] # check if there are undone intentions left # return 0 if there is something left to do # return 1 if nothing is queued +# with -n: return immediately +# without -n: wait until nothing more to do intentions_left() { + if [ ! "x$1" = 'x-n' ]; then + while intentions_left -n; do + sleep 1 + done + fi find "${intentions_directory}" \ -maxdepth 1 \ -type f \ @@ -90,7 +97,7 @@ intentions_left() { # execute_all_intentions # executes all intentions execute_all_intentions() { - while intentions_left; do + while intentions_left -n; do execute_intention done } |