mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 04:05:50 +00:00
feat: Additional mirrors
This commit is contained in:
parent
aec44f2668
commit
d123dd5bc9
1 changed files with 30 additions and 6 deletions
|
|
@ -370,27 +370,51 @@ downloadImage() {
|
||||||
url=$(getLink "$version")
|
url=$(getLink "$version")
|
||||||
|
|
||||||
if [ -n "$url" ]; then
|
if [ -n "$url" ]; then
|
||||||
|
|
||||||
if [[ "$tried" != "n" ]]; then
|
if [[ "$tried" != "n" ]]; then
|
||||||
info "Failed to download $desc from Microsoft, will try another mirror now..."
|
info "Failed to download $desc from Microsoft, will try another mirror now..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tried="y"
|
tried="y"
|
||||||
downloadFile "$iso" "$url" "$desc" && return 0
|
downloadFile "$iso" "$url" "$desc" && return 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
url=$(secondLink "$version")
|
url=$(getLink2 "$version")
|
||||||
|
|
||||||
if [ -n "$url" ]; then
|
if [ -n "$url" ]; then
|
||||||
|
|
||||||
if [[ "$tried" != "n" ]]; then
|
if [[ "$tried" != "n" ]]; then
|
||||||
info "Failed to download $desc, will try another mirror now..."
|
info "Failed to download $desc, will try another mirror now..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tried="y"
|
tried="y"
|
||||||
downloadFile "$iso" "$url" "$desc" && return 0
|
downloadFile "$iso" "$url" "$desc" && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
url=$(getLink3 "$version")
|
||||||
|
|
||||||
|
if [ -n "$url" ]; then
|
||||||
|
if [[ "$tried" != "n" ]]; then
|
||||||
|
info "Failed to download $desc, will try another mirror now..."
|
||||||
|
fi
|
||||||
|
tried="y"
|
||||||
|
downloadFile "$iso" "$url" "$desc" && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
url=$(getLink4 "$version")
|
||||||
|
|
||||||
|
if [ -n "$url" ]; then
|
||||||
|
if [[ "$tried" != "n" ]]; then
|
||||||
|
info "Failed to download $desc, will try another mirror now..."
|
||||||
|
fi
|
||||||
|
tried="y"
|
||||||
|
downloadFile "$iso" "$url" "$desc" && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
url=$(getLink5 "$version")
|
||||||
|
|
||||||
|
if [ -n "$url" ]; then
|
||||||
|
if [[ "$tried" != "n" ]]; then
|
||||||
|
info "Failed to download $desc, will try another mirror now..."
|
||||||
|
fi
|
||||||
|
tried="y"
|
||||||
|
downloadFile "$iso" "$url" "$desc" && return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue