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
52f8b787
Commit
52f8b787
authored
Feb 16, 2017
by
neilpang
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/622
parent
ad153ae0
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
52f8b787
...
@@ -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")"
printf
--
"%s"
"
$text
"
|
sed
"s|^
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
>
"
$__conf
"
printf -- "%s
\n
" "$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")"
printf
--
"%s"
"
$text
"
|
sed
"s|^#
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
>
"
$__conf
"
printf -- "%s
\n
" "$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