From 0076e3f1672f60d95acfa458acaa7c187c793c2f Mon Sep 17 00:00:00 2001 From: Ca11back <24651341+Ca11back@users.noreply.github.com> Date: Mon, 23 Aug 2021 10:10:29 +0800 Subject: [PATCH] Fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit showlog 追加命令增加空格,不确定对不对 470 eval变单引号,防止拉库正则被Glob解析 --- shell/update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/update.sh b/shell/update.sh index 9645a649..ac77bbbf 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -467,7 +467,7 @@ main() { eval echo -e "\#\# 开始执行... $begin_time\\\n" $cmd [[ -f $task_error_log_path ]] && cat $task_error_log_path $cmd if [[ -n $p2 ]]; then - eval update_repo "$p2" "$p3" "$p4" "$p5" "$p6" $cmd + eval update_repo '$p2' '$p3' '$p4' '$p5' '$p6' $cmd else echo -e "命令输入错误...\n" usage @@ -477,7 +477,7 @@ main() { get_user_info get_uniq_path "$p2" log_path="$dir_log/update/${log_time}_${uniq_path}.log" - [[ "$show_log" == "false" ]] && cmd=">> $log_path" + [[ "$show_log" == "false" ]] && cmd=" >> $log_path" eval echo -e "\#\# 开始执行... $begin_time\\\n" $cmd [[ -f $task_error_log_path ]] && eval cat $task_error_log_path $cmd