diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-04-09 17:57:41 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-04-09 17:57:41 -0400 |
commit | 90a6bbda5c181569a969edb0d191d19b6110755b (patch) | |
tree | 7ae3e5e7d0fdd0f2e6e524016b799d39c0abc637 /tools/read-dependencies | |
parent | 19b11d7e269360880d11d883a59b80b2909cee0f (diff) | |
download | vyos-cloud-init-90a6bbda5c181569a969edb0d191d19b6110755b.tar.gz vyos-cloud-init-90a6bbda5c181569a969edb0d191d19b6110755b.zip |
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.
Diffstat (limited to 'tools/read-dependencies')
-rwxr-xr-x | tools/read-dependencies | 8 |
1 files changed, 2 insertions, 6 deletions
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 - - - |