Commit 23cb43c8 authored by neil's avatar neil
Browse files

fix issue: sed contains "&" sign

parent 2c03af20
......@@ -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