修复bot启动下载文件失败

This commit is contained in:
hanhh
2021-05-30 20:44:40 +08:00
parent ea56e44669
commit 307207dddd
2 changed files with 5 additions and 13 deletions
+1 -9
View File
@@ -3,21 +3,13 @@
## 导入通用变量与函数
dir_shell=/ql/shell
. $dir_shell/share.sh
repo_path="${dir_repo}/SuMaiKaDe_jddockerbot"
url="https://ghproxy.com/https://github.com/SuMaiKaDe/jddockerbot.git"
repo_path="${dir_repo}/dockerbot"
echo -e "\n1、安装bot依赖...\n"
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev
echo -e "\nbot依赖安装成功...\n"
echo -e "2、下载bot所需文件...\n"
if [ -d ${repo_path}/.git ]; then
reset_romote_url ${repo_path} ${url}
git_pull_scripts ${repo_path}
else
git_clone_scripts ${url} ${repo_path} "master"
fi
cp -rf "$repo_path/jbot" $dir_root
if [[ ! -f "$dir_root/config/bot.json" ]]; then
cp -f "$repo_path/config/bot.json" "$dir_root/config"