mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
修改 shell 参数处理逻辑
This commit is contained in:
parent
e70cd6579f
commit
34f690c53d
|
@ -58,7 +58,7 @@ format_params() {
|
||||||
if type timeout &>/dev/null; then
|
if type timeout &>/dev/null; then
|
||||||
timeoutCmd="timeout --foreground -s 14 -k 10s $command_timeout_time "
|
timeoutCmd="timeout --foreground -s 14 -k 10s $command_timeout_time "
|
||||||
fi
|
fi
|
||||||
params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
|
# params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":lm:" opt; do
|
while getopts ":lm:" opt; do
|
||||||
|
@ -81,7 +81,7 @@ format_params "$@"
|
||||||
define_program "$@"
|
define_program "$@"
|
||||||
handle_log_path "$@"
|
handle_log_path "$@"
|
||||||
|
|
||||||
eval . $dir_shell/otask.sh "$params" "$cmd"
|
eval . $dir_shell/otask.sh "$cmd"
|
||||||
[[ -f "$dir_log/$log_path" ]] && cat "$dir_log/$log_path"
|
[[ -f "$dir_log/$log_path" ]] && cat "$dir_log/$log_path"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user