|
@ -1610,14 +1610,14 @@ _setopt() { |
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
fi |
|
|
fi |
|
|
text="$(cat "$__conf")" |
|
|
text="$(cat "$__conf")" |
|
|
echo "$text" | sed "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
|
|
printf -- "%s" "$text" | sed "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
|
|
elif grep -n "^#$__opt$__sep" "$__conf" >/dev/null; then |
|
|
elif grep -n "^#$__opt$__sep" "$__conf" >/dev/null; then |
|
|
if _contains "$__val" "&"; then |
|
|
if _contains "$__val" "&"; then |
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
fi |
|
|
fi |
|
|
text="$(cat "$__conf")" |
|
|
text="$(cat "$__conf")" |
|
|
echo "$text" | sed "s|^#$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
|
|
printf -- "%s" "$text" | sed "s|^#$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
_debug3 APP |
|
|
_debug3 APP |
|
|