Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/why_dont_you
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/why_dont_you
parentb46ff981026ec7541b23c131c0c77b984fd33cae (diff)
remove "grep ... part1*part2" bug
Diffstat (limited to 'bin/why_dont_you')
-rwxr-xr-xbin/why_dont_you12
1 files changed, 6 insertions, 6 deletions
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$||