Commit 5a29f018 authored by neil's avatar neil
Browse files

setopt if the conf doesn't exist.

parent 72775c5a
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment