]> git.neil.brown.name Git - wiggle.git/commitdiff
get_conf was messing up the 'name' variable
authorNeil Brown <neilb@suse.de>
Tue, 13 Jun 2006 12:57:03 +0000 (22:57 +1000)
committerNeil Brown <neilb@suse.de>
Tue, 13 Jun 2006 12:57:03 +0000 (22:57 +1000)
Signed-off-by: Neil Brown <neilb@suse.de>
p

diff --git a/p b/p
index 4f6d47558a3c50a1be40af055ed5216cb58c6c24..5af652b7fd63da4d6db3e8fda5cd5ca7d789653f 100755 (executable)
--- a/p
+++ b/p
@@ -91,28 +91,28 @@ nl='
 '
 get_conf()
 {
-       name=$1
-       context=$2
-       result=
-       active=yes
-       sep=
+       _name=$1
+       _context=$2
+       _result=
+       _active=yes
+       _sep=
        [ -f .patches/config ] || >> .patches/config
        while read a b c
        do
            case $a in
-                   '[global]' ) active=yes ;;
-                   "[$context]") active=yes ;;
-                   "["*"]" ) active= ;;
-                   * ) if [ " $b" == " =" -a " $a" = " $name" -a -n "$active" ];
+                   '[global]' ) _active=yes ;;
+                   "[$_context]") _active=yes ;;
+                   "["*"]" ) _active= ;;
+                   * ) if [ " $b" == " =" -a " $a" = " $_name" -a -n "$_active" ];
                            then
-                           result="$result$sep$c"
-                           sep=$nl
+                           _result="$_result$_sep$c"
+                           _sep=$nl
                            fi
                            ;;
            esac
        done < .patches/config
-       result=$(echo "$result" | sed 's/^"//' )
-       eval $name=\"\$result\"
+       _result=$(echo "$_result" | sed 's/^"//' )
+       eval $_name=\"\$_result\"
 }
 
 upgrade_one()