summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-13 10:26:35 +0200
committerErich Eckner <git@eckner.net>2017-09-13 10:26:35 +0200
commitef1582777fff756ed391b403266b3bbbabb182a0 (patch)
tree5206fb6eea39cac7f51cead224ad40d9909efe8c /bin/get-assignment
parent79ee1532e6b4bc23a23398f7d60442feddb85b72 (diff)
downloadbuilder-ef1582777fff756ed391b403266b3bbbabb182a0.tar.xz
bin/get-assignment, bin/return-assignment: clean up some "grep -l" occurences
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 93f2886..bb9cb40 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -43,10 +43,13 @@ hand_out_assignment() {
echo "${slave}" > "${work_dir}/package-states/$1.$2.$3.$4.locked"
# lock every loop this package breaks
- grep -lxF "${1}" "${work_dir}/build-list.loops/"loop_* | \
- tee -a "${work_dir}/package-states/$1.$2.$3.$4.locked" | \
- sed 's|$|.locked|' | \
- xargs -rn1 touch
+ find "${work_dir}/build-list.loops" -maxdepth 1 \
+ -name 'loop_*' \
+ -not -name 'loop_*.locked' \
+ -exec grep -qxF "$1" '{}' \; \
+ -exec touch '{}.locked' \; \
+ -print >> \
+ "${work_dir}/package-states/$1.$2.$3.$4.locked"
exit 0