mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
添加ql -l update
This commit is contained in:
+17
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user