From 7bc5004683cfdac35f162df45b88eb37baaf221a Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Mon, 23 Aug 2021 11:41:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Derror=5Flog=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/update.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shell/update.sh b/shell/update.sh index 3cfcb24b..6a0dbc09 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -435,12 +435,12 @@ main() { case $p1 in update) echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path update_qinglong "$2" >> $log_path ;; extra) echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path run_extra_shell >> $log_path ;; repo) @@ -448,7 +448,7 @@ main() { get_uniq_path "$p2" "$p6" log_path="$dir_log/update/${log_time}_${uniq_path}.log" echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path if [[ -n $p2 ]]; then update_repo "$p2" "$p3" "$p4" "$p5" "$p6" >> $log_path else @@ -461,7 +461,7 @@ main() { get_uniq_path "$p2" log_path="$dir_log/update/${log_time}_${uniq_path}.log" echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path if [[ -n $p2 ]]; then update_raw "$p2" >> $log_path else @@ -471,17 +471,17 @@ main() { ;; rmlog) echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path . $dir_shell/rmlog.sh "$p2" >> $log_path ;; bot) echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path . $dir_shell/bot.sh >> $log_path ;; check) echo -e "## 开始执行... $begin_time\n" >> $log_path - cat $task_error_log_path >> $log_path + [[ -f $task_error_log_path ]] && cat $task_error_log_path >> $log_path . $dir_shell/check.sh >> $log_path ;; *)