移除variables.sh

This commit is contained in:
whyour 2021-04-03 20:57:24 +08:00
parent a519997da7
commit 79507a2f38
3 changed files with 40 additions and 43 deletions

View File

@ -92,8 +92,7 @@ delcron() {
[ "$delname" != "" ] && notify "删除 ${author} 失效脚本" "${delname}"
}
. $ShellDir/shell/variables.sh
. $ShellDir/shell/api.sh
. /ql/shell/api.sh
get_token
if [[ ${gitpullstatus} -eq 0 ]]; then

View File

@ -1,5 +1,38 @@
#!/usr/bin/env bash
ShellDir=${QL_DIR:-$(
cd $(dirname $0)
pwd
)}
[[ $QL_DIR ]] && ShellJs=js
LogDir=$ShellDir/log
[ ! -d $LogDir ] && mkdir -p $LogDir
DbDir=$ShellDir/db
[ ! -d $DbDir ] && mkdir -p $DbDir
ManualLogDir=$ShellDir/manual_log
[ ! -d $ManualLogDir ] && mkdir -p $ManualLogDir
ScriptsDir=$ShellDir/scripts
ConfigDir=$ShellDir/config
FileConf=$ConfigDir/config.sh
CookieConf=$ConfigDir/cookie.sh
AuthConf=$ConfigDir/auth.json
ExtraShell=$ConfigDir/extra.sh
FileConfSample=$ShellDir/sample/config.sh.sample
ListCronSample=$ShellDir/sample/crontab.list.sample
ListCronCurrent=$ConfigDir/crontab.list
ListCronRemote=$ScriptsDir/docker/crontab_list.sh
ListCurrentTask=$LogDir/task.list
ListRemoteTask=$LogDir/js.list
ListJsAdd=$LogDir/js-add.list
ListJsDrop=$LogDir/js-drop.list
ContentVersion=$ShellDir/version
ContentNewTask=$ShellDir/new_task
ContentDropTask=$ShellDir/drop_task
SendVersion=$ShellDir/send_version
isTermux=$ANDROID_RUNTIME_ROOT$ANDROID_ROOT
ShellURL=https://github.com.cnpmjs.org/whyour/qinglong
ScriptsURL=https://github.com.cnpmjs.org/gossh520/jd_scripts
Import_Conf() {
if [ ! -s $FileConf ]; then
echo -e "复制一份 $FileConfSample 示例配置文件\n\n"
@ -243,7 +276,6 @@ fi
echo -e "\nJS脚本目录$ScriptsDir\n"
echo -e "--------------------------------------------------------------\n"
. $ShellDir/shell/variables.sh
. $ShellDir/shell/api.sh
get_token
@ -251,14 +283,14 @@ Import_Conf
Random_Pull_Cron
# 更新shell
[ -f $ShellDir/package.json ] && PanelDependOld=$(cat $ShellDir/package.json)
Git_Pull_Shell
Git_Pull_Shell_Next
# [ -f $ShellDir/package.json ] && PanelDependOld=$(cat $ShellDir/package.json)
# Git_Pull_Shell
# Git_Pull_Shell_Next
## 更新scripts
[ -f $ScriptsDir/package.json ] && ScriptsDependOld=$(cat $ScriptsDir/package.json)
Git_Pull_Scripts
Git_Pull_Scripts_Next
# [ -f $ScriptsDir/package.json ] && ScriptsDependOld=$(cat $ScriptsDir/package.json)
# Git_Pull_Scripts
# Git_Pull_Scripts_Next
## 调用用户自定义的extra.sh
if [[ $EnableExtraShell == true ]]; then

View File

@ -1,34 +0,0 @@
#!/usr/bin/env bash
ShellDir=${QL_DIR:-$(
cd $(dirname $0)
pwd
)}
[[ $QL_DIR ]] && ShellJs=js
LogDir=$ShellDir/log
[ ! -d $LogDir ] && mkdir -p $LogDir
DbDir=$ShellDir/db
[ ! -d $DbDir ] && mkdir -p $DbDir
ManualLogDir=$ShellDir/manual_log
[ ! -d $ManualLogDir ] && mkdir -p $ManualLogDir
ScriptsDir=$ShellDir/scripts
ConfigDir=$ShellDir/config
FileConf=$ConfigDir/config.sh
CookieConf=$ConfigDir/cookie.sh
AuthConf=$ConfigDir/auth.json
ExtraShell=$ConfigDir/extra.sh
FileConfSample=$ShellDir/sample/config.sh.sample
ListCronSample=$ShellDir/sample/crontab.list.sample
ListCronCurrent=$ConfigDir/crontab.list
ListCronRemote=$ScriptsDir/docker/crontab_list.sh
ListCurrentTask=$LogDir/task.list
ListRemoteTask=$LogDir/js.list
ListJsAdd=$LogDir/js-add.list
ListJsDrop=$LogDir/js-drop.list
ContentVersion=$ShellDir/version
ContentNewTask=$ShellDir/new_task
ContentDropTask=$ShellDir/drop_task
SendVersion=$ShellDir/send_version
isTermux=$ANDROID_RUNTIME_ROOT$ANDROID_ROOT
ShellURL=https://github.com.cnpmjs.org/whyour/qinglong
ScriptsURL=https://github.com.cnpmjs.org/gossh520/jd_scripts