修复git_pull和diy命令

This commit is contained in:
whyour 2021-04-04 17:10:03 +08:00
parent b10a2a71d0
commit 95b44d915c
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#author:spark thanks to: https://github.com/sparkssssssss/scripts #author:spark thanks to: https://github.com/sparkssssssss/scripts
ShellDir=${QL_DIR:-$(
cd $(dirname $0)
pwd
)}
[[ $QL_DIR ]] && ShellJs=js
declare -A BlackListDict declare -A BlackListDict
author=$1 author=$1
repo=$2 repo=$2

View File

@ -233,7 +233,8 @@ Add_Cron() {
JsAdd=$(cat $ListJsAdd) JsAdd=$(cat $ListJsAdd)
for Cron in $JsAdd; do for Cron in $JsAdd; do
if [[ $Cron == jd_bean_sign ]]; then if [[ $Cron == jd_bean_sign ]]; then
echo "4 0,9 * * * $ShellJs $Cron" >>$ListCronCurrent local name=$(cat "$ScriptsDir/$Cron.js" | grep -E "new Env\(" | perl -pe "s|(^.+)new Env\(\'*\"*(.+?)'*\"*\).+|\2|")
add_cron_api "4 0,9 * * *" "$ShellJs $Cron" "$name"
else else
local name=$(cat "$ScriptsDir/$Cron.js" | grep -E "new Env\(" | perl -pe "s|(^.+)new Env\(\'*\"*(.+?)'*\"*\).+|\2|") local name=$(cat "$ScriptsDir/$Cron.js" | grep -E "new Env\(" | perl -pe "s|(^.+)new Env\(\'*\"*(.+?)'*\"*\).+|\2|")
local param=$(cat $ListCronRemote | grep -E "\/$Cron\." | perl -pe "s|(^.+) node */scripts/(j[drx]_\w+)\.js.+|\1\:$ShellJs \2|") local param=$(cat $ListCronRemote | grep -E "\/$Cron\." | perl -pe "s|(^.+) node */scripts/(j[drx]_\w+)\.js.+|\1\:$ShellJs \2|")