Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/return-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-22 16:43:40 +0200
committerErich Eckner <git@eckner.net>2017-06-22 16:43:40 +0200
commit0e13adff76c5ab655df3b9fb0dcd28b4df5083f5 (patch)
tree2e0922a2550b6776ca790545a68bbed234af6be3 /bin/return-assignment
parentb46ff981026ec7541b23c131c0c77b984fd33cae (diff)
remove "grep ... part1*part2" bug
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment6
1 files changed, 2 insertions, 4 deletions
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