Commit 5a89ec27 authored by Neil's avatar Neil
Browse files

Merge pull request #18 from Neilpang/dev

fix issue: sed contains "&" sign
parents 2c03af20 23cb43c8
......@@ -196,6 +196,9 @@ _setopt() {
fi
if grep -H -n "^$__opt$__sep" "$__conf" > /dev/null ; then
_debug OK
if [[ "$__val" == *"&"* ]] ; then
__val="$(echo $__val | sed 's/&/\\&/g')"
fi
sed -i "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" "$__conf"
else
_debug APP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment