Update githubclone.sh

This commit is contained in:
Darren 2023-04-17 12:58:10 +08:00 committed by GitHub
parent 14cb8c460c
commit d70da5614a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,9 +24,13 @@ 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 --depth=1 "$mirror_url"; then if git clone "$mirror_url"; then
echo "Successfully cloned from $mirror_url" echo "Successfully cloned from $mirror_url"
exit 0 exit 0
else
echo "Failed to clone from $mirror_url (attempt $i)"
fi fi
done done
done done
echo "Failed to clone the repository after multiple attempts. Please check your network connection and try again later."