Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
ad153ae0
Commit
ad153ae0
authored
Feb 16, 2017
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/622
parent
72af092c
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
ad153ae0
...
@@ -1610,14 +1610,14 @@ _setopt() {
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment