From b13a1a45f862eaeb2d701aff707a24bf64d36af7 Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 10 Nov 2021 10:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drepo=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/task.sh | 15 +++++++++++++++ shell/update.sh | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/shell/task.sh b/shell/task.sh index 178006a0..e0666b34 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -78,6 +78,11 @@ run_nohup() { run_normal() { local first_param=$1 cd $dir_scripts + local relative_path="${first_param%/*}" + if [[ ! -z ${relative_path} ]]; then + cd ${relative_path} + first_param=${first_param/$relative_path\//} + fi define_program "$first_param" if [[ $first_param == *.js ]]; then if [[ $# -eq 1 ]]; then @@ -137,6 +142,11 @@ run_concurrent() { local cookieStr=$(echo ${array_run[*]} | sed 's/\ /\&/g') cd $dir_scripts + local relative_path="${first_param%/*}" + if [[ ! -z ${relative_path} ]]; then + cd ${relative_path} + first_param=${first_param/$relative_path\//} + fi define_program "$first_param" log_time=$(date "+%Y-%m-%d-%H-%M-%S") log_dir_tmp="${first_param##*/}" @@ -192,6 +202,11 @@ run_designated() { fi cd $dir_scripts + local relative_path="${file_param%/*}" + if [[ ! -z ${relative_path} ]]; then + cd ${relative_path} + file_param=${file_param/$relative_path\//} + fi 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 a5834db0..da504c0e 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -394,7 +394,7 @@ gen_list_repo() { results=$(eval $cmd | sed 's/^..//' | egrep $dependence) for _file in ${results}; do file_path=$(dirname $_file) - make_dir "${dir_scripts}/${file_path}" + make_dir "${dir_scripts}/${uniq_path}/${file_path}" cp -f $_file "${dir_scripts}/${uniq_path}/${file_path}" done fi