修复task命令参数引入

This commit is contained in:
whyour 2021-05-04 13:17:08 +08:00
parent 082acc2fb5
commit 34775dd14d
4 changed files with 15 additions and 25 deletions

View File

@ -5,7 +5,7 @@ dir_shell=/ql/shell
. $dir_shell/share.sh
## 导入配置文件
import_config_and_check
import_config
## 生成pt_pin清单
gen_pt_pin_array () {

View File

@ -5,7 +5,7 @@ dir_shell=/ql/shell
. $dir_shell/share.sh
## 导入配置文件
import_config_no_check rmlog
import_config
days=$1

View File

@ -45,25 +45,15 @@ original_name=(
notify.sh
)
## 导入配置文件不校验
import_config_no_check () {
## 导入配置文件
import_config () {
[ -f $file_cookie ] && . $file_cookie
[ -f $file_config_user ] && . $file_config_user
}
## 导入配置文件并校验
import_config_and_check () {
import_config_no_check
if [[ ! -s $file_cookie ]]; then
echo -e "请先配置好Cookie...\n"
exit 1
else
user_sum=0
for line in $(cat $file_cookie); do
let user_sum++
eval Cookie${user_sum}="\"$line\""
done
fi
}
## 创建目录,$1目录的绝对路径
@ -261,4 +251,4 @@ detect_termux
detect_macos
define_cmd
fix_config
import_config_no_check
import_config

View File

@ -41,7 +41,7 @@ define_program () {
elif [[ $p1 == *.py ]]; then
which_program="python3"
else
which_program="bash"
which_program=""
fi
}
@ -59,7 +59,7 @@ random_delay () {
## scripts目录下所有可运行脚本数组
gen_array_scripts () {
import_config_no_check
import_config
local dir_current=$(pwd)
local i="-1"
cd $dir_scripts
@ -98,7 +98,7 @@ run_nohup () {
run_normal () {
local p1=$1
cd $dir_scripts
import_config_and_check
import_config
define_program "$p1"
combine_all
if [[ $AutoHelpOther == true ]] && [[ $(ls $dir_code) ]]; then
@ -117,8 +117,8 @@ run_normal () {
run_concurrent () {
local p1=$1
cd $dir_scripts
import_config_and_check
define_program
import_config
define_program "$p1"
make_dir $dir_log/$p1
log_time=$(date "+%Y-%m-%d-%H-%M-%S.%N")
echo -e "\n各账号间已经在后台开始并发执行前台不输入日志日志直接写入文件中。\n"