tweak to prepend_var
This commit is contained in:
parent
8ef0b344d6
commit
569fd3bd5c
@ -24,11 +24,10 @@ fi
|
|||||||
# can cause security problems
|
# can cause security problems
|
||||||
function prepend_var () {
|
function prepend_var () {
|
||||||
# we have to use eval to do double indirection, I think
|
# we have to use eval to do double indirection, I think
|
||||||
eval value=x"\$$1"
|
eval value="\$$1"
|
||||||
if [ $value = x ]; then
|
if [ "x$value" = x ]; then
|
||||||
export $1=$2
|
export $1=$2
|
||||||
else
|
else
|
||||||
eval value="\$$1"
|
|
||||||
export $1=$2:$value
|
export $1=$2:$value
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user