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
5a29f018
Commit
5a29f018
authored
Dec 26, 2015
by
neil
Browse files
setopt if the conf doesn't exist.
parent
72775c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
5a29f018
...
@@ -210,7 +210,9 @@ _setopt() {
...
@@ -210,7 +210,9 @@ _setopt() {
echo
usage:
$0
'"file" "opt" "=" "value" [";"]'
echo
usage:
$0
'"file" "opt" "=" "value" [";"]'
return
return
fi
fi
if
[
-f
$__conf
]
;
touch
$__conf
fi
if
grep
-H
-n
"^
$__opt$__sep
"
$__conf
;
then
if
grep
-H
-n
"^
$__opt$__sep
"
$__conf
;
then
_debug OK
_debug OK
sed
-i
"s|^
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
$__conf
sed
-i
"s|^
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
$__conf
...
...
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