aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-02-06 21:22:29 -0800
committerZac Medico <zmedico@gentoo.org>2018-02-06 21:24:24 -0800
commit4a0a949d601969c672d9cf70ef8cf8682553f787 (patch)
treeb419597cd95838a5573f3ab8056734ecf9713d83
parentphase-helpers.sh: optimize array length tests (diff)
downloadportage-4a0a949d.tar.gz
portage-4a0a949d.tar.bz2
portage-4a0a949d.zip
phase-functions.sh: suppress shellcheck SC1087
Adding braces to ${x} suppresses the following shellcheck error: SC1087: Braces are required when expanding arrays, as in ${array[idx]}. Reported-by: R0b0t1 <r030t1@gmail.com>
-rw-r--r--bin/phase-functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 10d54ca74..0ffabd99e 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -541,9 +541,9 @@ __dyn_install() {
# fnmatch patterns to regular expressions
for x in QA_DT_NEEDED QA_FLAGS_IGNORED QA_PRESTRIPPED QA_SONAME ; do
if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ; then
- eval "$x=(\"\${$x[@]}\" ${QA_PREBUILT//\*/.*})"
+ eval "${x}=(\"\${${x}[@]}\" ${QA_PREBUILT//\*/.*})"
else
- eval "$x+=\" ${QA_PREBUILT//\*/.*}\""
+ eval "${x}+=\" ${QA_PREBUILT//\*/.*}\""
fi
done