diff --git a/shell/task.sh b/shell/task.sh index f09da655..178006a0 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -78,8 +78,6 @@ run_nohup() { run_normal() { local first_param=$1 cd $dir_scripts - local relative_path="${first_param%/*}" - [[ ! -z ${relative_path} ]] && cd ${relative_path} define_program "$first_param" if [[ $first_param == *.js ]]; then if [[ $# -eq 1 ]]; then @@ -139,8 +137,6 @@ run_concurrent() { local cookieStr=$(echo ${array_run[*]} | sed 's/\ /\&/g') cd $dir_scripts - local relative_path="${first_param%/*}" - [[ ! -z ${relative_path} ]] && cd ${relative_path} define_program "$first_param" log_time=$(date "+%Y-%m-%d-%H-%M-%S") log_dir_tmp="${first_param##*/}" @@ -196,8 +192,6 @@ run_designated() { fi cd $dir_scripts - local relative_path="${first_param%/*}" - [[ ! -z ${relative_path} ]] && cd ${relative_path} define_program "$file_param" log_time=$(date "+%Y-%m-%d-%H-%M-%S") log_dir_tmp="${file_param##*/}" diff --git a/shell/update.sh b/shell/update.sh index 9016d9be..eeeec8a4 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -407,7 +407,7 @@ gen_list_repo() { result=$(update_cron_command_api "$cmd_task ${uniq_path}/${filename}:$cron_id") fi done - grep -E "$cmd_task $uniq_path" $list_crontab_user | perl -pe "s|.*ID=(.*) $cmd_task ($uniq_path.*)\.*|\2|" | awk -F " " '{print $1}' | sort -u >"$dir_list_tmp/${repo}_user.list" + grep -E "$cmd_task $uniq_path" $list_crontab_user | perl -pe "s|.*ID=(.*) $cmd_task ($uniq_path.*)\.*|\2|" | awk -F " " '{print $1}' | sort -u >"$dir_list_tmp/${uniq_path}_user.list" cd $dir_current }