From 0e13adff76c5ab655df3b9fb0dcd28b4df5083f5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 22 Jun 2017 16:43:40 +0200 Subject: remove "grep ... part1*part2" bug --- bin/return-assignment | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index 3090089..8e24ed8 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -68,8 +68,7 @@ if [ "$5" = 'ERROR' ]; then grep '\.locked$' | \ sed 's@^.*/\([^/]\+\)\.\([0-9a-f]\{40\}\.\)\{2\}[^.]\+\.locked$@\1@' )" - grep -xF "${1}" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ - cut -d: -f1 | \ + grep -lxF "${1}" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ while read -r loop; do if [ -z "$( ( @@ -206,8 +205,7 @@ ls "${work_dir}/package-states" | \ xargs -rn1 rm -f # remove all loops which are broken by this package -grep -xF "$1" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ - cut -d: -f1 | \ +grep -lxF "$1" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \ sed 'p;s|$|.locked|' | \ xargs -rn1 rm -f -- cgit v1.2.3-70-g09d2