diff --git a/src/define.sh b/src/define.sh index 9b71a9d..543e531 100644 --- a/src/define.sh +++ b/src/define.sh @@ -281,6 +281,55 @@ 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