index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | lib/intentions-queue | 8 |
diff --git a/lib/intentions-queue b/lib/intentions-queue index 61ec4f3..f244e1b 100755 --- a/lib/intentions-queue +++ b/lib/intentions-queue @@ -92,7 +92,15 @@ intentions_left() { # execute_all_intentions # executes all intentions execute_all_intentions() { + exec 6> "${intentions_lock_file}" + if ! verbose_flock 6; then + >&2 echo 'someone already executes intentions - no need to schedule a second run' + return + fi + while intentions_left -n; do execute_intention done + + flock -u 6 } |