mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Improve LTSC and IoT edition handling (#1926)
This commit is contained in:
+17
-3
@@ -672,15 +672,29 @@ hasVersion() {
|
||||
local id="$1"
|
||||
local tag="$2"
|
||||
local xml="$3"
|
||||
local edition
|
||||
local edition alternate=""
|
||||
|
||||
[ ! -f "/run/assets/$id.xml" ] && return 1
|
||||
|
||||
edition=$(printEdition "$id" "")
|
||||
[ -z "$edition" ] && return 1
|
||||
[[ "${xml,,}" != *"<${tag,,}>${edition,,}</${tag,,}>"* ]] && return 1
|
||||
|
||||
return 0
|
||||
[[ "${xml,,}" == *"<${tag,,}>${edition,,}</${tag,,}>"* ]] && return 0
|
||||
|
||||
case "${id,,}" in
|
||||
*"-iot" | *"-iot-eval" )
|
||||
alternate="${id/-iot/-ltsc}" ;;
|
||||
*"-ltsc" | *"-ltsc-eval" )
|
||||
alternate="${id/-ltsc/-iot}" ;;
|
||||
* ) return 1 ;;
|
||||
esac
|
||||
|
||||
edition=$(printEdition "$alternate" "")
|
||||
[ -z "$edition" ] && return 1
|
||||
|
||||
[[ "${xml,,}" == *"<${tag,,}>${edition,,}</${tag,,}>"* ]] && return 0
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
selectVersion() {
|
||||
|
||||
Reference in New Issue
Block a user