mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 17:10:27 +00:00
23 lines
431 B
Bash
23 lines
431 B
Bash
#!/bin/bash
|
|
#repo=$1
|
|
#path=$2
|
|
url_path=(
|
|
https://ghproxy.com/https://github.com
|
|
https://github.com)
|
|
git_clone(){
|
|
for r in ${1[*]}
|
|
do
|
|
filename=$(echo $r | cut -d '/' -f 2)
|
|
for x in ${url_path[*]}
|
|
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
|