From 64d405256d0faafa15cc0087fedb10423fb67f0a Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 29 Apr 2024 03:36:37 +0200 Subject: [PATCH] Update define.sh --- src/define.sh | 98 +++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/src/define.sh b/src/define.sh index 543e531..270ca6f 100644 --- a/src/define.sh +++ b/src/define.sh @@ -76,6 +76,55 @@ parseVersion() { return 0 } +validVersion() { + + local id="$1" + + case "${id,,}" in + "win11${PLATFORM,,}" | "win11${PLATFORM,,}-enterprise-eval") + return 0 + ;; + "win10${PLATFORM,,}" | "win10${PLATFORM,,}-enterprise-eval") + return 0 + ;; + "win10${PLATFORM,,}-enterprise-iot-eval" | "win10${PLATFORM,,}-enterprise-ltsc-eval") + return 0 + ;; + "win81${PLATFORM,,}" | "win81${PLATFORM,,}-enterprise-eval") + return 0 + ;; + "win2022-eval") + return 0 + ;; + "win2019-eval") + return 0 + ;; + "win2016-eval") + return 0 + ;; + "win2012r2-eval") + return 0 + ;; + "win2008r2") + return 0 + ;; + "win7${PLATFORM,,}") + return 0 + ;; + "winvista${PLATFORM,,}") + return 0 + ;; + "winxpx86") + return 0 + ;; + "core11" | "tiny11" | "tiny10") + return 0 + ;; + esac + + return 1 +} + isESD() { local id="$1" @@ -281,55 +330,6 @@ getVersion() { return 0 } -validVersion() { - - local id="$1" - - case "${id,,}" in - "win11${PLATFORM,,}" | "win11${PLATFORM,,}-enterprise-eval") - return 0 - ;; - "win10${PLATFORM,,}" | "win10${PLATFORM,,}-enterprise-eval") - return 0 - ;; - "win10${PLATFORM,,}-enterprise-iot-eval" | "win10${PLATFORM,,}-enterprise-ltsc-eval") - return 0 - ;; - "win81${PLATFORM,,}" | "win81${PLATFORM,,}-enterprise-eval") - return 0 - ;; - "win2022-eval") - return 0 - ;; - "win2019-eval") - return 0 - ;; - "win2016-eval") - return 0 - ;; - "win2012r2-eval") - return 0 - ;; - "win2008r2") - return 0 - ;; - "win7${PLATFORM,,}") - return 0 - ;; - "winvista${PLATFORM,,}") - return 0 - ;; - "winxpx86") - return 0 - ;; - "core11" | "tiny11" | "tiny10") - return 0 - ;; - esac - - return 1 -} - getLink() { # Fallbacks for users who cannot connect to Microsoft servers