-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathjd_fixpull_.sh
39 lines (36 loc) · 1.71 KB
/
jd_fixpull_.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
#15 3 * * 3 jd_fixpull_.sh
#new Env('拉库失败修复');
## Build 20230429
echo -e '\n开始修复。。。\n'
DIR="$( cd "$( dirname $0 )" >/dev/null 2>&1 && pwd )"
#echo $DIR
function fix(){
if [[ -z "$(echo "$DIR"|grep 'main')" ]];then
if [[ -d /ql/repo/6dylan6_jdpro ]];then
rm -rf /ql/repo/6dylan6_jdpro
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
elif [[ -d /ql/data/repo/6dylan6_jdpro ]];then
rm -rf /ql/data/repo/6dylan6_jdpro
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
else
echo -e '无需修复,拉不动可能是代理问题'
#find /ql -maxdepth 2 -type d
return 1
fi
else
if [[ -d /ql/repo/6dylan6_jdpro_main ]];then
rm -rf /ql/repo/6dylan6_jdpro_main
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify" "main"
elif [[ -d /ql/data/repo/6dylan6_jdpro_main ]];then
rm -rf /ql/data/repo/6dylan6_jdpro_main
#ql repo https://ghproxy.com/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify" "main"
else
echo -e '无需修复,拉不动可能是代理问题\n'
#find /ql -maxdepth 2 -type d
return 1
fi
fi
}
fix
[[ $(echo $?) -eq 0 ]] && echo -e '修复完成,再拉库试试!,如果还不行是网络或代理问题!!!'