summaryrefslogtreecommitdiff
path: root/functions/aliases.sh
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-04-01 09:29:52 +0100
committerRaphaƫl Hertzog <hertzog@debian.org>2020-04-23 09:38:01 +0000
commit11836c0c18b07f4bd1ea22a2163875975f3e6816 (patch)
treea3534b7d09a538fecec2379fdba0a7c6a12247a2 /functions/aliases.sh
parentf6a50b6db204fa1a6d0ae8b371c4108911aed0eb (diff)
downloadvyos-live-build-11836c0c18b07f4bd1ea22a2163875975f3e6816.tar.gz
vyos-live-build-11836c0c18b07f4bd1ea22a2163875975f3e6816.zip
fix $@ parameter expansion issues
$@ when unquoted is subject to further word splitting. this fixes a bunch of instances where it was incorrectly being used unquoted. Gbp-Dch: Short
Diffstat (limited to 'functions/aliases.sh')
-rwxr-xr-xfunctions/aliases.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/functions/aliases.sh b/functions/aliases.sh
index bf77e4284..e899b1e60 100755
--- a/functions/aliases.sh
+++ b/functions/aliases.sh
@@ -20,10 +20,8 @@ In_list ()
shift
local ITEM
- for ITEM in ${@}
- do
- if [ "${NEEDLE}" = "${ITEM}" ]
- then
+ for ITEM in "${@}"; do
+ if [ "${NEEDLE}" = "${ITEM}" ]; then
return 0
fi
done
@@ -34,8 +32,7 @@ In_list ()
Truncate ()
{
local FILE
- for FILE in ${@}
- do
+ for FILE in "${@}"; do
if [ ! -L ${FILE} ]
then
: > ${FILE}