diff options
author | Zac Medico <zmedico@gentoo.org> | 2018-02-04 20:22:05 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-02-04 20:22:46 -0800 |
commit | 2a5be51673654d9605308f8c80d5588f67a5e8e0 (patch) | |
tree | 8d05bda9178fccf907206f93766116135b64a3f2 | |
parent | ebuild.sh: use -gt comparison for ${ECLASS_DEPTH} (diff) | |
download | portage-2a5be516.tar.gz portage-2a5be516.tar.bz2 portage-2a5be516.zip |
etc-update: quote array expansions
Reported-by: R0b0t1 <r030t1@gmail.com>
-rwxr-xr-x | bin/etc-update | 6 |
1 files 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 |