index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-08 08:46:32 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-08 08:46:32 +0200 |
commit | 838c46e3140e95f95d5850e134f91a1f8acbb5eb (patch) | |
tree | f880610fc707cacce386cb2ed25fb466c2987087 /bin | |
parent | b3d55133c9ba450676249aa9641f00020300ab2b (diff) |
-rwxr-xr-x | bin/get-package-updates | 20 |
diff --git a/bin/get-package-updates b/bin/get-package-updates index 928fe5d..4ca3679 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -29,13 +29,13 @@ eval set -- "$( echo usage )" -block=false +block_flag='-n' while true do case "$1" in -b|--block) - block=true + block_flag='' ;; -h|--help) usage 0 @@ -94,17 +94,11 @@ done # Create a lock file for build list. -while true; do - exec 9> "${build_list_lock_file}" - if flock -n 9; then - break - fi - if ! ${block}; then - >&2 echo 'come back (shortly) later - I cannot lock build list.' - exit - fi - sleep 0.1 -done +exec 9> "${build_list_lock_file}" +if ! flock ${block_flag} 9; then + >&2 echo 'come back (shortly) later - I cannot lock build list.' + exit +fi echo 'Check modified packages from the last update, and put them to the build list.' |