mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Improve architecture detection for download links (#1956)
This commit is contained in:
+5
-2
@@ -380,15 +380,18 @@ downloadWindowsEval() {
|
|||||||
--head \
|
--head \
|
||||||
-- "$link" || return 1
|
-- "$link" || return 1
|
||||||
|
|
||||||
|
local lower="${link,,}"
|
||||||
|
local separator='(^|[[:space:]_./-])'
|
||||||
|
|
||||||
case "${PLATFORM,,}" in
|
case "${PLATFORM,,}" in
|
||||||
"x64" )
|
"x64" )
|
||||||
if [[ "${link,,}" != *"x64"* ]]; then
|
if [[ "$lower" =~ ${separator}(arm64|a64) ]]; then
|
||||||
echo "Found download link: $link"
|
echo "Found download link: $link"
|
||||||
error "Download link is for the wrong platform? Please report this at $SUPPORT/issues"
|
error "Download link is for the wrong platform? Please report this at $SUPPORT/issues"
|
||||||
return 1
|
return 1
|
||||||
fi ;;
|
fi ;;
|
||||||
"arm64" )
|
"arm64" )
|
||||||
if [[ "${link,,}" != *"a64"* && "${link,,}" != *"arm64"* ]]; then
|
if [[ "$lower" =~ ${separator}(x64|x86|amd64) ]]; then
|
||||||
if enabled "$DEBUG"; then
|
if enabled "$DEBUG"; then
|
||||||
echo "Found download link: $link"
|
echo "Found download link: $link"
|
||||||
echo "Link for ARM platform currently not available!"
|
echo "Link for ARM platform currently not available!"
|
||||||
|
|||||||
Reference in New Issue
Block a user