summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-12 15:51:26 +0200
committerErich Eckner <git@eckner.net>2017-06-12 15:51:26 +0200
commit06cd37e72a019696f30f009e3a260655023edb3b (patch)
treea8909224aa85efc464f11cce5227440c49b15a3f /bin
parent1b801fa3c6b8f0d9788f76e4328ac3bd57eeb92e (diff)
downloadbuilder-06cd37e72a019696f30f009e3a260655023edb3b.tar.xz
bin/get-assignment: bugfix
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-assignment45
1 files changed, 23 insertions, 22 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 2f1c4f6..ffa8c76 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -127,29 +127,30 @@ locked_packages="$(
sed 's|\(\.[0-9a-f]\{40\}\)\{2\}\.[^\.\]\+\.locked$||'
)"
-ls "${work_dir}/build-list.loops/" | \
- grep '^loop_[0-9]\+$' | \
- while read -r loop; do
- if [ -z "$(
- (
+for package in $(
+ ls "${work_dir}/build-list.loops/" | \
+ grep '^loop_[0-9]\+$' | \
+ while read -r loop; do
+ if [ -z "$(
+ (
+ cat "${work_dir}/build-list.loops/${loop}"
+ echo "${locked_packages}"
+ ) | \
+ sort | \
+ uniq -d
+ )" ]; then
cat "${work_dir}/build-list.loops/${loop}"
- echo "${locked_packages}"
- ) | \
- sort | \
- uniq -d
- )" ]; then
- cat "${work_dir}/build-list.loops/${loop}"
- fi
- done | \
- sort | \
- uniq -c | \
- sort -k1nr,1 | \
- awk '{print $2}' | \
- while read -r package; do
- if assignment="$(grep "^${package//./\\.} " "${work_dir}/build-list")"; then
- hand_out_assignment ${assignment}
- fi
- done
+ fi
+ done | \
+ sort | \
+ uniq -c | \
+ sort -k1nr,1 | \
+ awk '{print $2}'
+); do
+ if assignment="$(grep "^${package//./\\.} " "${work_dir}/build-list")"; then
+ hand_out_assignment ${assignment}
+ fi
+done
# Remove the lock file