diff options
author | Erich Eckner <git@eckner.net> | 2017-11-23 10:09:35 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-11-23 10:09:35 +0100 |
commit | 175ab2ae8bc8dd69e5cbf780fca42f4c893560ad (patch) | |
tree | e9eb0d020cc0d1fda347613607ebe79f1bd11862 | |
parent | d55aef4d57e264c28f1d42da9fb3bbb3718e8fef (diff) | |
download | builder-175ab2ae8bc8dd69e5cbf780fca42f4c893560ad.tar.xz |
bin/get-assignment: list each slave only once per .locked file
-rwxr-xr-x | bin/get-assignment | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/get-assignment b/bin/get-assignment index 607f826..f755204 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -41,9 +41,13 @@ hand_out_assignment() { "${work_dir}/build-list" echo "$1 $2 $3 $4 ${sub_pkgrel}" - # shellcheck disable=SC2154 - echo "${slave}" >> \ - "${work_dir}/package-states/$1.$2.$3.$4.locked" + { + # shellcheck disable=SC2154 + echo "${slave}" + cat "${work_dir}/package-states/$1.$2.$3.$4.locked" + } | \ + sort -u | \ + sponge "${work_dir}/package-states/$1.$2.$3.$4.locked" # lock every loop this package breaks find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \ |