1 Star 0 Fork 2

风(yef)/jd-base

forked from wight3/jd-base 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
create_share_codes.sh.sample 3.54 KB
一键复制 编辑 原始数据 按行查看 历史
evine 提交于 2020-11-08 14:21 . 增加一个自动上车脚本给有缘人
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export LC_ALL=C
## 按以下格式修改为自己的种豆得豆互助码,每个互助码间使用换行来分开,首尾一对引号
## 如不需要提交此互助码,删除互助码即可
ShareCodesBean="mze7pstbax4l7u5ggn5y2olhfy
3nwlq2wyvmz7sn4d5akh4rnrczsih2dehcx7as4ym6fgb3q7y5tq
olmijoxgmjutybihibx67mwivxbag4rjviz3cji
rsuben7ys7sfbu5eub7knbibke
olmijoxgmjutzexyge246xwmaxy43t3jsqc74zy"
## 按以下格式修改为自己的东东农场互助码,每个互助码间使用换行来分开,首尾一对引号
## 如不需要提交此互助码,删除互助码即可
ShareCodesFarm="e6e04602d5e343258873af1651b603ec
52801b06ce2a462f95e1d59d7e856ef4
e2fd1311229146cc9507528d0b054da8
6dc9461f662d490991a31b798f624128
30f29addd75d44e88fb452bbfe9f2110"
## 按以下格式修改为自己的东东萌宠互助码,每个互助码间使用换行来分开,首尾一对引号
## 如不需要提交此互助码,删除互助码即可
ShareCodesPet="MTE1NDQ5OTIwMDAwMDAwMzU5ODAzOTk=
MTE1NDUwMTI0MDAwMDAwMDM2MTUyNjE1
MTE1NDAxNzgwMDAwMDAwMzgyMTUyNTU=
MTE1NDAxNzgwMDAwMDAwMzgyMDk2MTk=
MTE1NDUyMjEwMDAwMDAwMzkxOTg1Mzc="
## 如果你希望在向服务器提交互助码后反馈提交结果,请补充ServerChan的SCKEY
## 教程:http://sc.ftqq.com/3.version
## 我懒,只做了ServerChan的通知渠道,其他不想做
SCKEY=""
################################## 以下勿动 ##################################
## 路径
ShellDir=$(cd $(dirname $0); pwd)
RootDir=$(cd $(dirname $0); cd ..; pwd)
ScriptsDir=${RootDir}/scripts
LogDir=${RootDir}/log
LogFile=${LogDir}/create_share_codes/create_share_codes.log
CreateURLBean="http://api.turinglabs.net/api/v1/jd/bean/create/"
CreateURLFarm="http://api.turinglabs.net/api/v1/jd/farm/create/"
CreateURLPet="http://api.turinglabs.net/api/v1/jd/pet/create/"
URLServerChan="https://sc.ftqq.com/"
## 删除旧的日志,创建新的日志
if [ ! -d ${LogDir}/create_share_codes ]; then
mkdir -p ${LogDir}/create_share_codes
fi
cd ${LogDir}/create_share_codes/
rm -f ${LogFile}
touch ${LogFile}
# 提交种豆得豆互助码
function CreateCodesBean {
echo -e "种豆得豆:\n\n" >> ${LogFile}
for Code in ${ShareCodesBean}
do
sleep 10
wget -q -O ${Code} ${CreateURLBean}${Code}
echo -n "${Code}: " >> ${LogFile}
cat ${Code} >> ${LogFile}
echo -e "\n\n" >> ${LogFile}
rm -f ${Code}
done
echo -e "\n\n" >> ${LogFile}
}
## 提交东东农场互助码
function CreateCodesFarm {
echo -e "东东农场:\n\n" >> ${LogFile}
for Code in ${ShareCodesFarm}
do
sleep 10
wget -q -O ${Code} ${CreateURLFarm}${Code}
echo -n "${Code}: " >> ${LogFile}
cat ${Code} >> ${LogFile}
echo -e "\n\n" >> ${LogFile}
rm -f ${Code}
done
echo -e "\n\n" >> ${LogFile}
}
## 提交东东萌宠互助码
function CreateCodesPet {
echo -e "东东萌宠:\n\n" >> ${LogFile}
for Code in ${ShareCodesPet}
do
sleep 10
wget -q -O ${Code} ${CreateURLPet}${Code}
echo -n "${Code}: " >> ${LogFile}
cat ${Code} >> ${LogFile}
echo -e "\n\n" >> ${LogFile}
rm -f ${Code}
done
echo -e "\n\n" >> ${LogFile}
}
## 向服务器提交互助码
if [ -n "${ShareCodesBean}" ]; then
CreateCodesBean
fi
if [ -n "${ShareCodesFarm}" ]; then
CreateCodesFarm
fi
if [ -n "${ShareCodesPet}" ]; then
CreateCodesPet
fi
## 向方糖发送消息
if [ -n "${SCKEY}" ]; then
desp=$(cat ${LogFile})
wget -q --output-document=/dev/null --post-data="text=互助码提交状态&desp=${desp}" ${URLServerChan}${SCKEY}.send
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hillcool1/jd-base.git
git@gitee.com:hillcool1/jd-base.git
hillcool1
jd-base
jd-base
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385