mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
feat: Validate platform variable
This commit is contained in:
parent
e8cf9651c2
commit
f7ca0c65b9
1 changed files with 10 additions and 12 deletions
22
src/mido.sh
22
src/mido.sh
|
|
@ -264,19 +264,17 @@ download_windows_eval() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$enterprise_type" in
|
case "$enterprise_type" in
|
||||||
"iot" )
|
"iot" | "ltsc" | "enterprise" )
|
||||||
"ltsc" )
|
case "${PLATFORM,,}" in
|
||||||
"enterprise" )
|
"x64" )
|
||||||
if [[ "${PLATFORM,,}" == "x64" ]]; then
|
iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
"arm64" )
|
||||||
fi
|
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
|
||||||
if [[ "${PLATFORM,,}" == "arm64" ]]; then
|
* )
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1)
|
error "Invalid platform specified, value \"$PLATFORM\" is not recognized!" && return 1 ;;
|
||||||
fi
|
esac ;;
|
||||||
;;
|
|
||||||
"server" )
|
"server" )
|
||||||
iso_download_link=$(echo "$iso_download_links" | head -n 1)
|
iso_download_link=$(echo "$iso_download_links" | head -n 1) ;;
|
||||||
;;
|
|
||||||
* )
|
* )
|
||||||
error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
|
error "Invalid type specified, value \"$enterprise_type\" is not recognized!" && return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue