Update git_proxy.sh

This commit is contained in:
徐月婷 2022-12-30 10:40:17 +08:00 committed by GitHub
parent 604fdf50e0
commit 5ce4a05c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1 +1,21 @@
#!/bin/bash
#repo=$1
#path=$2
git_clone(){
for r in ${1[*]}
do
filename=$(echo $r | cut -d '/' -f 2)
for x in ${2[*]}
do
if [ -e $filename ]; then
echo "$filename was cloned successfully"
break
else
timeout -k 1 3 git clone $x/$r.git
fi
done
done
}
git_clone