Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/finddeps.in
diff options
context:
space:
mode:
Diffstat (limited to 'finddeps.in')
-rw-r--r--finddeps.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/finddeps.in b/finddeps.in
index cc1ffab..5f89b55 100644
--- a/finddeps.in
+++ b/finddeps.in
@@ -23,24 +23,25 @@ if [[ $match = '-h' ]]; then
exit 0
fi
-find . -type d | while read d; do
+find . -type d | while read -r d; do
if [[ -f "$d/PKGBUILD" ]]; then
- unset pkgname depends makedepends optdepends
+ pkgname=() depends=() makedepends=() optdepends=()
+ # shellcheck source=PKGBUILD.proto
. "$d/PKGBUILD"
for dep in "${depends[@]}"; do
# lose the version comparator, if any
depname=${dep%%[<>=]*}
- [[ $depname = $match ]] && echo "$d (depends)"
+ [[ $depname = "$match" ]] && echo "$d (depends)"
done
for dep in "${makedepends[@]}"; do
# lose the version comparator, if any
depname=${dep%%[<>=]*}
- [[ $depname = $match ]] && echo "$d (makedepends)"
+ [[ $depname = "$match" ]] && echo "$d (makedepends)"
done
for dep in "${optdepends[@]/:*}"; do
# lose the version comaparator, if any
depname=${dep%%[<>=]*}
- [[ $depname = $match ]] && echo "$d (optdepends)"
+ [[ $depname = "$match" ]] && echo "$d (optdepends)"
done
fi
done