index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-07-03 10:14:14 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-07-03 10:14:14 +0200 |
commit | fcfd7abfeb7dda72de365eb20038a9378301ccc5 (patch) | |
tree | e90d8e99e5ffac39218b27edf9ff3f1c0cd4a80b /bin | |
parent | f374df980982f59185a3de2b9cef8164bf837593 (diff) |
-rwxr-xr-x | bin/seed-build-list | 13 |
diff --git a/bin/seed-build-list b/bin/seed-build-list index b69eaef..a744380 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -224,6 +224,11 @@ done < \ awk '{print "append " $1 " " $2 " " $3 " " $4 " " $1}' > \ "${tmp_dir}/build-list.append" +# Create a lock file for build list. + +exec 9> "${build_list_lock_file}" +flock 9 + # ignore packages already on the build list awk '{print "old " $1 " " $2 " " $3 " " $4 " " $1}' "${work_dir}/build-list" > \ "${tmp_dir}/build-list.old" @@ -232,5 +237,9 @@ cat "${tmp_dir}/build-list.append" "${tmp_dir}/build-list.old" | \ sort -k6,6 | \ uniq -uf5 | \ grep '^append ' | \ - awk '{print $2 " " $3 " " $4 " " $5}' > \ - "${work_dir}/build-list.new" + awk '{print $2 " " $3 " " $4 " " $5}' >> \ + "${work_dir}/build-list" + +# Remove the lock file + +rm -f "${build_list_lock_file}" |