mirror of
https://github.com/dockur/windows.git
synced 2026-08-04 04:57:13 +01:00
Update image.sh
This commit is contained in:
+3
-9
@@ -88,26 +88,20 @@ getVersionPriority() {
|
|||||||
|
|
||||||
local id="${1,,}"
|
local id="${1,,}"
|
||||||
local base="${2,,}"
|
local base="${2,,}"
|
||||||
local order_name="EDITION_ORDER"
|
|
||||||
local entry priority patterns pattern
|
local entry priority patterns pattern
|
||||||
local result="other" score best_score=-1
|
local result="other" score best_score=-1
|
||||||
|
local -a order=()
|
||||||
|
|
||||||
id="${id%-eval}"
|
id="${id%-eval}"
|
||||||
|
|
||||||
case "$base" in
|
getEditionOrder "$base" order || return 1
|
||||||
"win20"* )
|
|
||||||
order_name="SERVER_EDITION_ORDER"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
local -n order_ref="$order_name"
|
|
||||||
|
|
||||||
local edition="${id#"$base"}"
|
local edition="${id#"$base"}"
|
||||||
edition="${edition#-}"
|
edition="${edition#-}"
|
||||||
|
|
||||||
# Use the most specific matching pattern. This prevents broad patterns
|
# Use the most specific matching pattern. This prevents broad patterns
|
||||||
# such as enterprise-* from taking precedence over enterprise-iot-*.
|
# such as enterprise-* from taking precedence over enterprise-iot-*.
|
||||||
for entry in "${order_ref[@]}"; do
|
for entry in "${order[@]}"; do
|
||||||
|
|
||||||
IFS='|' read -r _ priority patterns <<< "$entry"
|
IFS='|' read -r _ priority patterns <<< "$entry"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user