finddeps: Use read builtin to iterate over packages

Using parameter substitution might result in unpredictable behaviour
when directories contain whitespaces here. The read shell builtin is the
proper way to read single lines.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-09-27 09:48:13 +02:00
parent 8edb443c12
commit 84b789f760
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ if [[ -z $match ]]; then
exit 0
fi
for d in "$(find . -type d)"; do
find . -type d | while read d; do
if [[ -f "$d/PKGBUILD" ]]; then
unset pkgname depends makedepends
. "$d/PKGBUILD"