Update define.sh

This commit is contained in:
Kroese 2024-05-05 19:26:23 +02:00 committed by GitHub
parent a9106cacca
commit 505f410517
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -391,18 +391,39 @@ switchEdition() {
return 0 return 0
} }
isESD() { getCatalog() {
local id="$1" local id="$1"
local ret="$2"
local url=""
local edition=""
case "${id,,}" in case "${id,,}" in
"win11${PLATFORM,,}" ) return 0 ;; "win11${PLATFORM,,}" )
"win10${PLATFORM,,}" ) return 0 ;; edition="Professional"
"win11${PLATFORM,,}-enterprise" | "win11${PLATFORM,,}-enterprise-eval" ) return 0 ;; url="https://go.microsoft.com/fwlink?linkid=2156292"
"win10${PLATFORM,,}-enterprise" | "win10${PLATFORM,,}-enterprise-eval" ) return 0 ;; ;;
"win10${PLATFORM,,}" )
edition="Professional"
url="https://go.microsoft.com/fwlink/?LinkId=841361"
;;
"win11${PLATFORM,,}-enterprise" )
edition="Enterprise"
url="https://go.microsoft.com/fwlink?linkid=2156292"
;;
"win10${PLATFORM,,}-enterprise" )
edition="Enterprise"
url="https://go.microsoft.com/fwlink/?LinkId=841361"
;;
esac esac
return 1 case "${ret,,}" in
"url" ) echo "$url" ;;
"edition" ) echo "$edition" ;;
*) echo "";;
esac
return 0
} }
getMido() { getMido() {
@ -472,17 +493,6 @@ getMido() {
return 1 return 1
} }
isMido() {
local id="$1"
local sum
sum=$(getMido "$id" "sum")
[ -n "$sum" ] && return 0
return 1
}
getLink1() { getLink1() {
# Fallbacks for users who cannot connect to the Microsoft servers # Fallbacks for users who cannot connect to the Microsoft servers
@ -879,6 +889,28 @@ getSize() {
return 0 return 0
} }
isMido() {
local id="$1"
local sum
sum=$(getMido "$id" "sum")
[ -n "$sum" ] && return 0
return 1
}
isESD() {
local id="$1"
local url
url=$(getMido "$id" "url")
[ -n "$url" ] && return 0
return 1
}
validVersion() { validVersion() {
local id="$1" local id="$1"