From ce1e7b877d73e69842dea6323d196fe9212c21f7 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 25 Jul 2026 03:30:32 +0200 Subject: [PATCH] feat: Improve architecture detection for download links (#1956) --- src/mido.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mido.sh b/src/mido.sh index 1e54919a..2487f347 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -380,15 +380,18 @@ downloadWindowsEval() { --head \ -- "$link" || return 1 + local lower="${link,,}" + local separator='(^|[[:space:]_./-])' + case "${PLATFORM,,}" in "x64" ) - if [[ "${link,,}" != *"x64"* ]]; then + if [[ "$lower" =~ ${separator}(arm64|a64) ]]; then echo "Found download link: $link" error "Download link is for the wrong platform? Please report this at $SUPPORT/issues" return 1 fi ;; "arm64" ) - if [[ "${link,,}" != *"a64"* && "${link,,}" != *"arm64"* ]]; then + if [[ "$lower" =~ ${separator}(x64|x86|amd64) ]]; then if enabled "$DEBUG"; then echo "Found download link: $link" echo "Link for ARM platform currently not available!"