From 90a6bbda5c181569a969edb0d191d19b6110755b Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 9 Apr 2013 17:57:41 -0400 Subject: tools: fix [some] shell quoting problems There were problems with these tools if the path had a space. This should make these tools safe. There are others that still have problems. --- tools/read-dependencies | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tools/read-dependencies') diff --git a/tools/read-dependencies b/tools/read-dependencies index 4c88aa87..cadb09a8 100755 --- a/tools/read-dependencies +++ b/tools/read-dependencies @@ -21,15 +21,11 @@ fi REQUIRES="$ROOT_DIR/Requires" -if [ ! -e "$REQUIRES" ] -then +if [ ! -e "$REQUIRES" ]; then echo "Unable to find 'Requires' file located at $REQUIRES" exit 1 fi # Filter out comments and empty liens -DEPS=$(cat $REQUIRES | grep -Pv "^\s*#" | grep -Pv '^\s*$') +DEPS=$(grep -Pv "^\s*#" "$REQUIRES" | grep -Pv '^\s*$') echo "$DEPS" | sort -d -f - - - -- cgit v1.2.3