From ef1582777fff756ed391b403266b3bbbabb182a0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 13 Sep 2017 10:26:35 +0200 Subject: bin/get-assignment, bin/return-assignment: clean up some "grep -l" occurences --- bin/get-assignment | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bin/get-assignment') 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 -- cgit v1.2.3-70-g09d2