添加ql -l update

This commit is contained in:
hanhh
2021-10-13 23:45:46 +08:00
parent 7335e2c299
commit ec0deeff06
2 changed files with 35 additions and 22 deletions
+17 -3
View File
@@ -427,6 +427,18 @@ get_uniq_path() {
}
main() {
## for ql update
show_log="false"
while getopts ":l" opt
do
case $opt in
l)
show_log="true"
;;
esac
done
[[ "$show_log" == "true" ]] && shift $(($OPTIND - 1))
local p1=$1
local p2=$2
local p3=$3
@@ -439,9 +451,11 @@ main() {
case $p1 in
update)
echo -e "## 开始执行... $begin_time\n" >>$log_path
[[ -f $task_error_log_path ]] && cat $task_error_log_path >>$log_path
update_qinglong "$2" >>$log_path
cmd=">> $log_path 2>&1"
[[ "$show_log" == "true" ]] && cmd=""
eval echo -e "## 开始执行... $begin_time\n" $cmd
[[ -f $task_error_log_path ]] && eval cat $task_error_log_path $cmd
eval update_qinglong "$2" $cmd
;;
extra)
echo -e "## 开始执行... $begin_time\n" >>$log_path