setopt if the conf doesn't exist.

This commit is contained in:
neil committed 2015-12-26 23:20:24 +08:00
1 parent 72775c5ad9
commit 5a29f018f2
1 file changed
+3 -1
+3 -1
View File
@@ -210,7 +210,9 @@ _setopt() {
echo usage: $0 '"file" "opt" "=" "value" [";"]'
return
fi
if [ -f $__conf ] ;
touch $__conf
fi
if grep -H -n "^$__opt$__sep" $__conf ; then
_debug OK
sed -i "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" $__conf
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.