From d123dd5bc9725b8981ce9210fc4443a8c667f1a5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 1 May 2024 02:40:27 +0200 Subject: [PATCH] feat: Additional mirrors --- src/install.sh | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/install.sh b/src/install.sh index 70aec16..fc29fe3 100644 --- a/src/install.sh +++ b/src/install.sh @@ -370,27 +370,51 @@ downloadImage() { url=$(getLink "$version") if [ -n "$url" ]; then - if [[ "$tried" != "n" ]]; then info "Failed to download $desc from Microsoft, will try another mirror now..." fi - tried="y" downloadFile "$iso" "$url" "$desc" && return 0 - fi - url=$(secondLink "$version") + url=$(getLink2 "$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=$(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 return 1