From 175ab2ae8bc8dd69e5cbf780fca42f4c893560ad Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 23 Nov 2017 10:09:35 +0100 Subject: bin/get-assignment: list each slave only once per .locked file --- bin/get-assignment | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/get-assignment') 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 \ -- cgit v1.2.3-70-g09d2