diff --git a/jd_sharecode.sh b/jd_sharecode.sh index 0458589..aaed89f 100644 --- a/jd_sharecode.sh +++ b/jd_sharecode.sh @@ -2,10 +2,7 @@ #15 3,23 * * * jd_sharecode.sh #new Env('获取互助码'); ## Build 20220325-001-test -grep '6dylan6_0126' /ql/data/config/task_before.sh >/dev/null 2>&1 || grep '6dylan6_0126' /ql/config/task_before.sh > /dev/null 2>&1 -if [[ $? != 0 ]];then - cp /ql/repo/6dylan6_jdpro/docker/task_before.sh /ql/config/ >/dev/null 2>&1 || cp /ql/data/repo/6dylan6_jdpro/docker/task_before.sh /ql/data/config/ -fi + DIR="$( cd "$( dirname $0 )" >/dev/null 2>&1 && pwd )" ## 导入通用变量与函数 #dir_shell=/ql/shell @@ -25,7 +22,10 @@ else dir_code=$dir_log/6dylan6_jdpro_main_jd_sharecode repo='6dylan6_jdpro_main' fi - +grep '6dylan6_0126' /ql/data/config/task_before.sh >/dev/null 2>&1 || grep '6dylan6_0126' /ql/config/task_before.sh > /dev/null 2>&1 +if [[ $? != 0 ]];then + cp /ql/repo/${repo}/docker/task_before.sh /ql/config/ >/dev/null 2>&1 || cp /ql/data/repo/${repo}/docker/task_before.sh /ql/data/config/ +fi [[ $QL_DIR == /ql ]] && dir_root=$QL_DIR [[ -d $dir_root/data ]] && dir_data=$dir_root/data [[ -d $dir_data/config ]] && dir_config=$dir_data/config