From 92056d66b5671aeca50ed601e64414ae3d2023d5 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Mon, 24 May 2021 20:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcron=20id=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/api.sh | 4 ++-- shell/update.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/api.sh b/shell/api.sh index af92af55..12b3a0ef 100755 --- a/shell/api.sh +++ b/shell/api.sh @@ -99,9 +99,9 @@ update_cron_command_api() { code=$(echo $api | jq -r .code) message=$(echo $api | jq -r .message) if [[ $code == 200 ]]; then - echo -e "$name -> 更新成功" + echo -e "$command -> 更新成功" else - echo -e "$name -> 更新失败(${message})" + echo -e "$command -> 更新失败(${message})" fi } diff --git a/shell/update.sh b/shell/update.sh index bc57e6ba..6e105948 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -345,7 +345,7 @@ gen_list_repo() { filename=$(basename $file) cp -f $file $dir_scripts/${repo}_${filename} echo ${repo}_${filename} >>"$dir_list_tmp/${repo}_scripts.list" - cron_id=$(grep -E "$cmd_task ${author}_${filename}" $list_crontab_user | perl -pe "s|.*ID=(.*) $cmd_task ${author}_${filename}\.*|\1|") + cron_id=$(cat $list_crontab_user | grep -E "$cmd_task ${author}_${filename}" | perl -pe "s|.*ID=(.*) $cmd_task ${author}_${filename}\.*|\1|") if [[ $cron_id ]]; then result=$(update_cron_command_api "$cmd_task ${repo}_${filename}:$cron_id") fi