diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-04-09 18:00:23 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-04-09 18:00:23 -0400 |
commit | 1c2adfa3835e031a0f946cef0d99fcfe3dfc1c95 (patch) | |
tree | 13018bc982ac82c24c819984f1ffa0c16971db3e /tools/read-dependencies | |
parent | 0d3c21c53369673529301f2c4e23bdb7bae7495b (diff) | |
parent | 90a6bbda5c181569a969edb0d191d19b6110755b (diff) | |
download | vyos-cloud-init-1c2adfa3835e031a0f946cef0d99fcfe3dfc1c95.tar.gz vyos-cloud-init-1c2adfa3835e031a0f946cef0d99fcfe3dfc1c95.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 - - - |