From ca2bda67b8841d04dc60b30898e29bd8806912d1 Mon Sep 17 00:00:00 2001 From: whyour Date: Tue, 11 May 2021 11:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/extra.sample.sh | 3 +++ shell/share.sh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 sample/extra.sample.sh diff --git a/sample/extra.sample.sh b/sample/extra.sample.sh new file mode 100644 index 00000000..3c99db25 --- /dev/null +++ b/sample/extra.sample.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +## 添加你需要重启自动执行的任意命令,比如 ql bot、ql repo diff --git a/shell/share.sh b/shell/share.sh index e9c38c87..7eeb3e53 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -23,6 +23,7 @@ file_config_user=$dir_config/config.sh file_auth_sample=$dir_sample/auth.sample.json file_auth_user=$dir_config/auth.json file_extra_shell=$dir_config/extra.sh +file_extra_sample=$dir_sample/extra.sample.sh file_notify_js_sample=$dir_sample/notify.js file_notify_py_sample=$dir_sample/notify.py file_notify_py=$dir_scripts/notify.py @@ -163,8 +164,8 @@ fix_config() { fi if [ ! -f $file_extra_shell ]; then - echo -e "检测到config配置目录下不存在extra.sh,创建一个空文件用于初始化...\n" - touch $file_extra_shell + echo -e "复制一份 $file_extra_sample 为 $file_extra_shell\n" + cp -fv $file_extra_sample $file_extra_shell echo fi