mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
Update git_proxy.sh
This commit is contained in:
parent
604fdf50e0
commit
5ce4a05c41
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user