diff options
author | 2013-08-03 15:14:14 -0700 | |
---|---|---|
committer | 2013-08-03 15:14:14 -0700 | |
commit | c0c15070d120546af3e43654f71b8178b8ddb882 (patch) | |
tree | 8432145eb9cc5e9dca7537591255b81f753a12c6 | |
parent | __repo_key: fix for bash-3.2 compatibility (diff) | |
download | portage-2.2.0_alpha193.tar.gz portage-2.2.0_alpha193.tar.bz2 portage-2.2.0_alpha193.zip |
__repo_key: comment on bash-3.2 compatibilityv2.2.0_alpha193
-rw-r--r-- | bin/isolated-functions.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 6ef8a9163..42d9e708d 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -461,6 +461,10 @@ __repo_key() { while read line; do [[ ${appropriate_section} == 0 && ${line} == "[$1]" ]] && appropriate_section=1 && continue [[ ${appropriate_section} == 1 && ${line} == "["*"]" ]] && appropriate_section=0 && continue + # If a conditional expression like [[ ${line} == $2*( )=* ]] is used + # then bash-3.2 produces an error like the following when the file is + # sourced: syntax error in conditional expression: unexpected token `(' + # Therefore, use a regular expression for compatibility. if [[ ${appropriate_section} == 1 && ${line} =~ ^${2}[[:space:]]*= ]]; then echo "${line##$2*( )=*( )}" exit_status=0 |