From 09162d503a0e243a7a2d3c07aced98eb28679121 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Mon, 24 May 2021 23:04:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/update.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/update.sh b/shell/update.sh index 86c85d33..f7f820a5 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -83,7 +83,7 @@ output_list_add_drop() { ## $1:失效任务清单文件路径 del_cron() { local list_drop=$1 - local author=$2 + local path=$2 local detail="" local ids="" echo -e "开始尝试自动删除失效的定时任务...\n" @@ -117,12 +117,12 @@ del_cron() { ## $1:新任务清单文件路径 add_cron() { local list_add=$1 - local author=$2 + local path=$2 echo -e "开始尝试自动添加定时任务...\n" local detail="" cd $dir_scripts for file in $(cat $list_add); do - local file_name=${file/${author}\_/} + local file_name=${file/${path}\_/} if [ -f $file ]; then cron_line=$( perl -ne "{ @@ -308,13 +308,13 @@ diff_scripts() { if [ -s $list_drop ]; then output_list_add_drop $list_drop "失效" if [[ ${AutoDelCron} == true ]]; then - del_cron $list_drop $2 + del_cron $list_drop $repo fi fi if [ -s $list_add ]; then output_list_add_drop $list_add "新" if [[ ${AutoAddCron} == true ]]; then - add_cron $list_add $2 + add_cron $list_add $repo fi fi cd $dir_current