feat: Validate platform variable

This commit is contained in:
Kroese 2025-09-14 19:24:52 +02:00 committed by GitHub
parent e8cf9651c2
commit f7ca0c65b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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