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
8acdf823
Commit
8acdf823
authored
Feb 16, 2017
by
neil
Committed by
GitHub
Feb 16, 2017
Browse files
Merge pull request #626 from Neilpang/dev
Dev
parents
2527f8f5
52f8b787
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
8acdf823
...
@@ -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\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")"
echo
"
$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