__repo_key: fix for bash-3.2 compatibility
authorZac Medico <zmedico@gentoo.org>
Sat, 3 Aug 2013 11:08:53 +0000 (04:08 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 Aug 2013 11:08:53 +0000 (04:08 -0700)
bin/isolated-functions.sh

index 4b5ed8b3a167b6bb3428ac518d82c6591da6e978..6ef8a91638aa48e766ddc4c8193c321a631dd470 100644 (file)
@@ -461,7 +461,7 @@ __repo_key() {
        while read line; do
                [[ ${appropriate_section} == 0 && ${line} == "[$1]" ]] && appropriate_section=1 && continue
                [[ ${appropriate_section} == 1 && ${line} == "["*"]" ]] && appropriate_section=0 && continue
-               if [[ ${appropriate_section} == 1 && ${line} == $2*( )=* ]]; then
+               if [[ ${appropriate_section} == 1 && ${line} =~ ^${2}[[:space:]]*= ]]; then
                        echo "${line##$2*( )=*( )}"
                        exit_status=0
                        break