[arch-projects] [devtools] [PATCH 3/4] finddeps: Use read builtin to iterate over packages

Lukas Fleischer archlinux at cryptocrack.de
Thu Oct 13 02:24:29 EDT 2011


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 at cryptocrack.de>
---
 finddeps |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/finddeps b/finddeps
index ec8cde4..3f4515b 100755
--- a/finddeps
+++ b/finddeps
@@ -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"
-- 
1.7.7



More information about the arch-projects mailing list