Merge pull request #43 from A7T/patch-1

Update clash.sh
This commit is contained in:
juewuy
2021-06-22 10:56:17 +08:00
committed by GitHub

View File

@@ -93,7 +93,7 @@ getconfig(){
setconfig(){ setconfig(){
#参数1代表变量名参数2代表变量值,参数3即文件路径 #参数1代表变量名参数2代表变量值,参数3即文件路径
[ -z "$3" ] && configpath=$clashdir/mark || configpath=$3 [ -z "$3" ] && configpath=$clashdir/mark || configpath=$3
[ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=\(.*\)#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath [ -n "$(grep ${1}= $configpath)" ] && sed -i "s#${1}=\(.*\)#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
} }
#启动相关 #启动相关
errornum(){ errornum(){