commit:     4a0a949d601969c672d9cf70ef8cf8682553f787
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  7 05:22:29 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb  7 05:24:24 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a0a949d

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 <AT> gmail.com>

 bin/phase-functions.sh | 4 ++--
 1 file 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
 

Reply via email to