From 5a29f018f282e849ee9b1de785eedb200fdec9fd Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 26 Dec 2015 23:20:24 +0800 Subject: [PATCH] setopt if the conf doesn't exist. --- le.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/le.sh b/le.sh index 2e005440..c47cfb72 100755 --- a/le.sh +++ b/le.sh @@ -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