mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
Update githubclone.sh
This commit is contained in:
parent
75ceb080fe
commit
5cecb2f6f5
@ -12,9 +12,9 @@ REPO_URL="https://github.com/$USERNAME/$REPO.git"
|
|||||||
|
|
||||||
# 加速地址列表
|
# 加速地址列表
|
||||||
MIRRORS=(
|
MIRRORS=(
|
||||||
|
"https://github.com"
|
||||||
"https://ghproxy.com/https://github.com"
|
"https://ghproxy.com/https://github.com"
|
||||||
"https://github.com.cnpmjs.org"
|
"https://github.com.cnpmjs.org"
|
||||||
"https://github.com"
|
|
||||||
"https://hub.fastgit.org"
|
"https://hub.fastgit.org"
|
||||||
"https://gitclone.com"
|
"https://gitclone.com"
|
||||||
"https://gh.api.99988866.xyz"
|
"https://gh.api.99988866.xyz"
|
||||||
@ -28,7 +28,7 @@ for mirror in "${MIRRORS[@]}"; do
|
|||||||
# 尝试克隆仓库
|
# 尝试克隆仓库
|
||||||
for i in {1..3}; do
|
for i in {1..3}; do
|
||||||
echo "Trying to clone from $mirror_url (attempt $i)"
|
echo "Trying to clone from $mirror_url (attempt $i)"
|
||||||
if git clone "$mirror_url"; then
|
if git clone --depth=1 "$mirror_url"; then
|
||||||
echo "Successfully cloned from $mirror_url"
|
echo "Successfully cloned from $mirror_url"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user