From c9db90deafc405a0bc9cabbdf6f69f44e5341848 Mon Sep 17 00:00:00 2001 From: Leon Date: Wed, 14 Jul 2021 15:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B1More=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/sh/Allinone.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Scripts/sh/Allinone.sh b/Scripts/sh/Allinone.sh index 47d946c..13b2f3d 100644 --- a/Scripts/sh/Allinone.sh +++ b/Scripts/sh/Allinone.sh @@ -41,6 +41,13 @@ fi # 授权 chmod 755 $extra_shell_path +# extra.sh 预设仓库及默认拉取仓库设置 +echo -e "(1)panghu999\n(2)JDHelloWorld\n(3)he1pu\n(4)shufflewzc" +echo -n "输入你想拉取的仓库编号(默认为 4):" +read -r defaultNum +defualtNum=${defaultNum:-'4'} +sed -i "s/\$default4/\$default$defaultNum/g" $extra_shell_path + # 将 extra.sh 添加到定时任务 if [ "$(grep -c extra.sh /ql/config/crontab.list)" = 0 ]; then echo "开始添加 task extra.sh" @@ -49,13 +56,6 @@ if [ "$(grep -c extra.sh /ql/config/crontab.list)" = 0 ]; then curl -s -H 'Accept: application/json' -H "Authorization: Bearer $token" -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept-Language: zh-CN,zh;q=0.9' --data-binary '{"name":"初始化任务","command":"ql extra","schedule":"15 0-23/4 * * *"}' --compressed 'http://127.0.0.1:5700/api/crons?t=1624782068473' fi -# extra.sh 预设仓库及默认拉取仓库设置 -echo -e "(1)panghu999\n(2)JDHelloWorld\n(3)he1pu\n(4)shufflewzc" -echo -n "输入你想拉取的仓库编号(默认为 4):" -read -r defaultNum -defualtNum=${defaultNum:-'4'} -sed -i "s/\$default4/\$default$defaultNum/g" $extra_shell_path - # 下载 code.sh if [ ! -a "$code_shell_path" ]; then