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/why_dont_you | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin/why_dont_you') diff --git a/bin/why_dont_you b/bin/why_dont_you index 2c4d43e..6424335 100755 --- a/bin/why_dont_you +++ b/bin/why_dont_you @@ -58,10 +58,11 @@ case "${action}" in sort | \ uniq -d | \ while read -r dep; do - grep -Fx "${dep}" "${work_dir}/package-infos/"*".builds" | \ - cut -d: -f1 | \ - xargs -rn1 basename | \ - cut -d. -f1 + grep -lxF "${dep}" "${work_dir}/package-infos/"*".builds" | \ + sed ' + s|^.*/|| + s|\(\.[^.]\+\)\{3\}|| + ' done | \ sort -u @@ -86,8 +87,7 @@ case "${action}" in fi dependent_packages="$( - grep -xF "${pkg}" "${work_dir}/package-infos/"*".depends" | \ - cut -d: -f1 | \ + grep -lxF "${pkg}" "${work_dir}/package-infos/"*".depends" | \ sed ' s|^.*/|| s|\.depends$|| -- cgit v1.2.3-70-g09d2