From cbaec17250e3edbdd10b2a836aa81b5e8801a49e Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 29 Apr 2024 17:06:49 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/install.sh b/src/install.sh index 909d2ce..0c83942 100644 --- a/src/install.sh +++ b/src/install.sh @@ -345,21 +345,26 @@ downloadImage() { desc=$(printVersion "$version" "Windows for ${PLATFORM}") fi - if isMido "$version"; then - tried="y" - doMido "$iso" "$version" "$desc" && return 0 + if [[ "${PLATFORM,,}" == "x64" ]]; then + if isMido "$version"; then + tried="y" + doMido "$iso" "$version" "$desc" && return 0 + fi fi if isESD "$version"; then - [[ "$tried" != "n" ]] && info "Failed to download $desc using Mido, will try a different method now..." + if [[ "${PLATFORM,,}" == "x64" ]]; then - ISO="$TMP/$version.esd" - iso="$ISO" + [[ "$tried" != "n" ]] && info "Failed to download $desc using Mido, will try a different method now..." + + ISO="$TMP/$version.esd" + iso="$ISO" + rm -rf "$TMP" + mkdir -p "$TMP" + fi tried="y" - rm -rf "$TMP" - mkdir -p "$TMP" if getESD "$TMP/esd" "$version"; then downloadFile "$iso" "$ESD_URL" "$desc" && return 0