mirror of
https://github.com/lan-tianxiang/JS_TOOL.git
synced 2025-07-13 20:22:35 +08:00
更新于 07-15 11:55 修复主库设定部分bug
This commit is contained in:
23
jd.sh
23
jd.sh
@ -391,7 +391,7 @@ SecureJs() {
|
||||
endLine=$(sed -n 'done(t)}}(t,e)}' $file)
|
||||
|
||||
sed -i $startLine','$endLine'd' $file
|
||||
cat $file_env_sys >> $file
|
||||
cat $file_env_sys >>$file
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1134,9 +1134,6 @@ UpdateTool() {
|
||||
git config --global --unset http.proxy
|
||||
## 导入配置文件,清除缓存
|
||||
import_config_no_check
|
||||
[ ! -z $JD_SCRIPTS_URL ] && [[ -z $(grep $JD_SCRIPTS_URL $dir_scripts/.git/config) ]] && rm -rf $dir_scripts
|
||||
[ -z $JD_SCRIPTS_URL ] && [[ -z $(grep $url_scripts $dir_scripts/.git/config) ]] && rm -rf $dir_scripts
|
||||
url_scripts=${JD_SCRIPTS_URL:-https://gitee.com/highdimen/clone_scripts.git}
|
||||
#IsPinValid
|
||||
## 在日志中记录时间与路径
|
||||
echo "
|
||||
@ -1176,11 +1173,21 @@ thirdpard脚本目录:$dir_thirdpard
|
||||
[ -f $dir_scripts/package.json ] && scripts_depend_old=$(cat $dir_scripts/package.json)
|
||||
[ -f $dir_scripts/githubAction.md ] && cp -f $dir_scripts/githubAction.md $list_task_action_scripts
|
||||
|
||||
if [ -d ${dir_scripts}/.git ]; then
|
||||
[ -z $JD_SCRIPTS_URL ] && [[ -z $(grep $url_scripts $dir_scripts/.git/config) ]] && rm -rf $dir_scripts
|
||||
if [[ ! -z $JD_SCRIPTS_URL ]]; then
|
||||
if [[ -z $(grep $JD_SCRIPTS_URL $dir_scripts/.git/config) ]]; then
|
||||
rm -rf $dir_scripts
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
url_scripts=${JD_SCRIPTS_URL:-https://gitee.com/highdimen/clone_scripts.git}
|
||||
branch_scripts=${JD_SCRIPTS_BRANCH:-origin/master}
|
||||
## 更新或克隆scripts
|
||||
if [ -d $dir_scripts/.git ]; then
|
||||
git_pull_scripts $dir_scripts origin/master
|
||||
git_pull_scripts $dir_scripts $branch_scripts
|
||||
else
|
||||
git_clone_scripts $url_scripts $dir_scripts
|
||||
git_clone_scripts $url_scripts $dir_scripts $branch_scripts
|
||||
fi
|
||||
|
||||
if [[ $exit_status -eq 0 ]]; then
|
||||
@ -1513,7 +1520,7 @@ find_file_and_path() {
|
||||
}
|
||||
|
||||
## 运行自定义脚本
|
||||
run_task_finish () {
|
||||
run_task_finish() {
|
||||
if [[ $EnableTaskFinishShell == true ]]; then
|
||||
echo -e "\n--------------------------------------------------------------\n"
|
||||
if [ -f $file_task_finish_shell ]; then
|
||||
@ -1521,7 +1528,7 @@ run_task_finish () {
|
||||
. $file_task_finish_shell
|
||||
echo -e "$file_task_finish_shell执行完毕...\n"
|
||||
else
|
||||
echo -e "$file_task_finish_shell文件不存在,跳过执行...\n"
|
||||
echo -e "$file_task_finish_shell文件不存在,跳过执行...\n"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Version: v0.15.2
|
||||
## Date: 2021-07-15
|
||||
## Update Content: 新增脚本域名限制(安全选项)
|
||||
## Version: v0.16.2
|
||||
## Date: 2021-07-16
|
||||
## Update Content: 新增脚本域名限制(安全选项),完善主库设定
|
||||
|
||||
## 上面版本号中,如果第2位数字有变化,那么代表增加了新的参数,如果只有第3位数字有变化,仅代表更新了注释,没有增加新的参数,可更新可不更新
|
||||
## 如需更新,请参考WIKI(https://github.com/lan-tianxiang/js_tool/wiki)中"如何更新配置文件"部分的操作说明,进行智能比对后修改。
|
||||
@ -12,9 +12,10 @@
|
||||
## 由于近期JS库变化较大,您可以手动更换本工具预先内置的库地址。
|
||||
## 部分文件的改动可以考虑用第三方库功能进行替换即可。
|
||||
## 值为空表示使用默认地址
|
||||
## 比如JD_SCRIPTS_URL="https://gitee.com/highdimen/clone_scripts.git"
|
||||
## 比如JD_SCRIPTS_URL="https://gitee.com/highdimen/clone_scripts.git"库的地址
|
||||
## JD_SCRIPTS_BRANCH="origin/master"库的分支,此项也需填写。
|
||||
JD_SCRIPTS_URL=""
|
||||
|
||||
JD_SCRIPTS_BRANCH=""
|
||||
|
||||
################################## 面板端口设置(选填) ##################################
|
||||
## 仅适用于非Docker的用户,Docker用户勿动
|
||||
|
Reference in New Issue
Block a user