summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-24 12:27:39 +0200
committerErich Eckner <git@eckner.net>2017-10-24 12:27:39 +0200
commit62ae0182ea898f88445d9402010c3e0d9194d0f5 (patch)
tree1f935cdc555c1964326dc8bd30e2743e2c16af6e /bin/get-assignment
parent95c434acfb878fb6937ad6ffe2ed201968443de0 (diff)
downloadbuilder-62ae0182ea898f88445d9402010c3e0d9194d0f5.tar.xz
bin/get-assignment: cleanup
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index be5c64e..ece83c7 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -39,9 +39,8 @@ hand_out_assignment() {
echo "${slave}" > "${work_dir}/package-states/$1.$2.$3.$4.locked"
# lock every loop this package breaks
- find "${work_dir}/build-list.loops" -maxdepth 1 \
- -name 'loop_*' \
- -not -name 'loop_*.locked' \
+ find "${work_dir}/build-list.loops" -maxdepth 1 -regextype grep \
+ -regex '.*/loop_[0-9]\+' \
-exec grep -qxF "$1" '{}' \; \
-exec touch '{}.locked' \; \
-print >> \
@@ -155,8 +154,11 @@ done
locked_packages=$(
find "${work_dir}/package-states/" -maxdepth 1 -printf '%f\n' | \
- grep '\(\.[0-9a-f]\{40\}\)\{2\}\.[^\.\]\+\.locked$' | \
- sed 's|\(\.[0-9a-f]\{40\}\)\{2\}\.[^\.\]\+\.locked$||'
+ sed '
+ s|\(\.[0-9a-f]\{40\}\)\{2\}\.[^\.\]\+\.locked$||
+ t
+ d
+ '
)
grep -vxF 'break_loops' "${work_dir}/build-list" | \