Skip to content

Commit

Permalink
get_conf was messing up the 'name' variable
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Brown <[email protected]>
  • Loading branch information
neilbrown committed Jun 13, 2006
1 parent d56b158 commit 333a657
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions p
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 333a657

Please sign in to comment.