🔨Update.sh
This commit is contained in:
parent
fd32eff800
commit
33976c827d
@ -17,8 +17,11 @@ code_config_path=$dir_config/code.sh
|
|||||||
task_before_raw_path=$dir_raw/task_before.sh
|
task_before_raw_path=$dir_raw/task_before.sh
|
||||||
task_before_config_path=$dir_config/task_before.sh
|
task_before_config_path=$dir_config/task_before.sh
|
||||||
|
|
||||||
|
GithubProxyUrl=""
|
||||||
TG_BOT_TOKEN=""
|
TG_BOT_TOKEN=""
|
||||||
TG_USER_ID=""
|
TG_USER_ID=""
|
||||||
|
openCardBean="10"
|
||||||
|
|
||||||
CollectedRepo="4"
|
CollectedRepo="4"
|
||||||
OtherRepo=""
|
OtherRepo=""
|
||||||
repoNum="4"
|
repoNum="4"
|
||||||
@ -30,8 +33,10 @@ BreakHelpNum="BreakHelpNum=\"11-1000\""
|
|||||||
|
|
||||||
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 -i "s/TG_BOT_TOKEN=\"\"/TG_BOT_TOKEN=\"$TG_BOT_TOKEN\"/g" $config_config_path
|
sed -ri "s/GithubProxyUrl=\"https\:\/\/ghproxy.com\/\"/GithubProxyUrl=\"${GithubProxyUrl}\"/g" $config_config_path
|
||||||
sed -i "s/TG_USER_ID=\"\"/TG_USER_ID=\"$TG_USER_ID\"/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/openCardBean=\"30\"/openCardBean=\"${openCardBean}\"/g" $config_config_path
|
||||||
|
|
||||||
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
|
||||||
@ -41,25 +46,30 @@ sed -i "s/OtherRepo=()/OtherRepo=(${OtherRepo})/g" $extra_config_path
|
|||||||
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=\$repo6/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
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
c=1000000
|
random_cookie(){
|
||||||
for r in {1..3}; do
|
c=1000000
|
||||||
p=`expr $c - $r`
|
for r in {1..3}; do
|
||||||
sed -ri "s/\"position\"\:${p}/regular${r}/" $file_db
|
p=`expr $c - $r`
|
||||||
done
|
sed -ri "s/\"position\"\:${p}/regular${r}/" $file_db
|
||||||
for line in {1..100}; do
|
done
|
||||||
sed -ri "${line}s/(\"position\"\:)[^,]*/\"position\"\:${RANDOM}/" $file_db
|
for line in {1..100}; do
|
||||||
done
|
sed -ri "${line}s/(\"position\"\:)[^,]*/\"position\"\:${RANDOM}/" $file_db
|
||||||
for r in {1..3}; do
|
done
|
||||||
p=`expr $c - $r`
|
for r in {1..3}; do
|
||||||
sed -ri "s/regular${r}/\"position\"\:${p}/" $file_db
|
p=`expr $c - $r`
|
||||||
done
|
sed -ri "s/regular${r}/\"position\"\:${p}/" $file_db
|
||||||
|
done
|
||||||
|
ql update
|
||||||
|
}
|
||||||
|
|
||||||
ql update
|
if [ $(date "+%H") -eq 18 ]; then
|
||||||
|
random_cookie
|
||||||
|
fi
|
||||||
Loading…
Reference in New Issue
Block a user