mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
Update git_proxy.sh
This commit is contained in:
parent
604fdf50e0
commit
5ce4a05c41
1 changed files with 20 additions and 0 deletions
|
@ -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 a new issue