mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
fix: Verify platform of download link
This commit is contained in:
parent
9a2b7de0d4
commit
049c36ff83
1 changed files with 20 additions and 5 deletions
25
src/mido.sh
25
src/mido.sh
|
|
@ -271,9 +271,14 @@ download_windows_eval() {
|
|||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
||||
else
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1)
|
||||
fi ;;
|
||||
fi
|
||||
[[ "${iso_download_link,,}" != *"x64"* ]] && iso_download_link="" ;;
|
||||
"arm64" )
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
||||
if [[ "${iso_download_link,,}" != *"a64"* ]]; then
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Link for ARM platform currently not available!"
|
||||
return 1
|
||||
fi ;;
|
||||
* )
|
||||
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||
esac ;;
|
||||
|
|
@ -284,14 +289,24 @@ download_windows_eval() {
|
|||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
||||
else
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
||||
fi ;;
|
||||
fi
|
||||
[[ "${iso_download_link,,}" != *"x64"* ]] && iso_download_link="" ;;
|
||||
"arm64" )
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
||||
if [[ "${iso_download_link,,}" != *"a64"* ]]; then
|
||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Link for ARM platform currently not available!"
|
||||
return 1
|
||||
fi ;;
|
||||
* )
|
||||
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||
esac ;;
|
||||
"server" )
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
|
||||
case "${PLATFORM,,}" in
|
||||
"x64" )
|
||||
iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
|
||||
* )
|
||||
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||
esac ;;
|
||||
* )
|
||||
error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue