🥧modify
This commit is contained in:
parent
e8188ddf53
commit
68098390e7
BIN
Scripts/.DS_Store
vendored
BIN
Scripts/.DS_Store
vendored
Binary file not shown.
@ -31,29 +31,35 @@ HelpType="HelpType=\"0\""
|
|||||||
BreakHelpType="BreakHelpType=\"1\""
|
BreakHelpType="BreakHelpType=\"1\""
|
||||||
BreakHelpNum="BreakHelpNum=\"11-1000\""
|
BreakHelpNum="BreakHelpNum=\"11-1000\""
|
||||||
|
|
||||||
|
update_config() {
|
||||||
curl -sL https://git.io/config.sh > $config_raw_path
|
curl -sL https://git.io/config.sh > $config_raw_path
|
||||||
mv -b $config_raw_path $dir_config
|
mv -b $config_raw_path $dir_config
|
||||||
sed -ri "s/GithubProxyUrl=\"https\:\/\/ghproxy.com\/\"/GithubProxyUrl=\"${GithubProxyUrl}\"/g" $config_config_path
|
sed -ri "s/GithubProxyUrl=\"https\:\/\/ghproxy.com\/\"/GithubProxyUrl=\"${GithubProxyUrl}\"/g" $config_config_path
|
||||||
sed -i "s/TG_BOT_TOKEN=\"\"/TG_BOT_TOKEN=\"${TG_BOT_TOKEN}\"/g" $config_config_path
|
sed -i "s/TG_BOT_TOKEN=\"\"/TG_BOT_TOKEN=\"${TG_BOT_TOKEN}\"/g" $config_config_path
|
||||||
sed -i "s/TG_USER_ID=\"\"/TG_USER_ID=\"${TG_USER_ID}\"/g" $config_config_path
|
sed -i "s/TG_USER_ID=\"\"/TG_USER_ID=\"${TG_USER_ID}\"/g" $config_config_path
|
||||||
sed -i "s/openCardBean=\"30\"/openCardBean=\"${openCardBean}\"/g" $config_config_path
|
sed -i "s/openCardBean=\"30\"/openCardBean=\"${openCardBean}\"/g" $config_config_path
|
||||||
|
}
|
||||||
|
|
||||||
|
update_extra() {
|
||||||
curl -sL https://git.io/extra.sh > $extra_raw_path
|
curl -sL https://git.io/extra.sh > $extra_raw_path
|
||||||
mv -b $extra_raw_path $dir_config
|
mv -b $extra_raw_path $dir_config
|
||||||
sed -i "s/CollectedRepo=(4)/CollectedRepo=(${CollectedRepo})/g" $extra_config_path
|
sed -i "s/CollectedRepo=(4)/CollectedRepo=(${CollectedRepo})/g" $extra_config_path
|
||||||
sed -i "s/OtherRepo=()/OtherRepo=(${OtherRepo})/g" $extra_config_path
|
sed -i "s/OtherRepo=()/OtherRepo=(${OtherRepo})/g" $extra_config_path
|
||||||
|
}
|
||||||
|
|
||||||
|
update_code() {
|
||||||
curl -sL https://git.io/code.sh > $code_raw_path
|
curl -sL https://git.io/code.sh > $code_raw_path
|
||||||
mv -b $code_raw_path $dir_config
|
mv -b $code_raw_path $dir_config
|
||||||
|
|
||||||
sed -i "s/repo=\$repo4/repo=\$repo${repoNum}/g" $code_config_path
|
sed -i "s/repo=\$repo4/repo=\$repo${repoNum}/g" $code_config_path
|
||||||
sed -i "/^HelpType=/c${HelpType}" $code_config_path
|
sed -i "/^HelpType=/c${HelpType}" $code_config_path
|
||||||
sed -i "/^BreakHelpType=/c${BreakHelpType}" $code_config_path
|
sed -i "/^BreakHelpType=/c${BreakHelpType}" $code_config_path
|
||||||
sed -i "/^BreakHelpNum=/c${BreakHelpNum}" $code_config_path
|
sed -i "/^BreakHelpNum=/c${BreakHelpNum}" $code_config_path
|
||||||
|
}
|
||||||
|
|
||||||
|
update_task_before() {
|
||||||
curl -sL https://git.io/task_before.sh > $task_before_raw_path
|
curl -sL https://git.io/task_before.sh > $task_before_raw_path
|
||||||
mv -b $task_before_raw_path $dir_config
|
mv -b $task_before_raw_path $dir_config
|
||||||
|
}
|
||||||
|
|
||||||
random_cookie() {
|
random_cookie() {
|
||||||
c=1000000
|
c=1000000
|
||||||
@ -68,9 +74,27 @@ random_cookie(){
|
|||||||
p=`expr $c - $r`
|
p=`expr $c - $r`
|
||||||
sed -ri "s/regular${r}/\"position\"\:${p}/" $file_db
|
sed -ri "s/regular${r}/\"position\"\:${p}/" $file_db
|
||||||
done
|
done
|
||||||
ql update
|
ql check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_sendNotify() {
|
||||||
|
cp -rf /ql/config/sendNotify.js /ql/scripts/sendNotify.js
|
||||||
|
cp -rf /ql/config/sendNotify.js /ql/ninja/backend/sendNotify.js
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
update_config
|
||||||
|
update_extra
|
||||||
|
update_code
|
||||||
|
update_task_before
|
||||||
|
update_sendNotify
|
||||||
|
|
||||||
if [ $(date "+%H") -eq 18 ]; then
|
if [ $(date "+%H") -eq 18 ]; then
|
||||||
random_cookie
|
random_cookie
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $@ in
|
||||||
|
ck)
|
||||||
|
random_cookie
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Loading…
Reference in New Issue
Block a user