commit: 2a5be51673654d9605308f8c80d5588f67a5e8e0
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 5 04:22:05 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 5 04:22:46 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2a5be516
etc-update: quote array expansions
Reported-by: R0b0t1 <r030t1 <AT> gmail.com>
bin/etc-update | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/etc-update b/bin/etc-update
index ea69f1478..7b48be215 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -767,7 +767,7 @@ portage_vars=(
)
if type -P portageq > /dev/null; then
- eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)"
envvar -v ${portage_vars[@]})
+ eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)"
envvar -v "${portage_vars[@]}")
else
[[ $OS_FAMILY == 'gentoo' ]] && die "missing portageq"
fi
@@ -801,7 +801,7 @@ cfg_vars=(
mode
)
# default them all to ""
-eval ${cfg_vars[@]/%/=}
+eval "${cfg_vars[@]/%/=}"
# then extract them all from the conf in one shot
# (ugly var at end is due to printf appending a '|' to last item)
get_config "($(printf '%s|' "${cfg_vars[@]}")NOVARFOROLDMEN)"
@@ -846,7 +846,7 @@ if ${NONINTERACTIVE_MV} ; then
fi
if ${VERBOSE} ; then
- for v in ${portage_vars[@]} ${cfg_vars[@]} TMP SCAN_PATHS ; do
+ for v in "${portage_vars[@]}" "${cfg_vars[@]}" TMP SCAN_PATHS ; do
echo "${v}=${!v}"
done
fi