mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Allow EDITION to override the automatic selection (#1888)
This commit is contained in:
@@ -697,6 +697,20 @@ selectVersion() {
|
||||
id=$(fromName "$name" "$platform")
|
||||
[ -z "$id" ] && warn "Unknown ${tag,,}: '$name'" && return 0
|
||||
|
||||
if [ -n "$EDITION" ] && [[ "$id" != win20* ]]; then
|
||||
case "${EDITION,,}" in
|
||||
"pro" | "professional" | "business" ) prefer="$id" ;;
|
||||
* ) prefer="$id-${EDITION,,}" ;;
|
||||
esac
|
||||
|
||||
if hasVersion "$prefer" "$tag" "$xml"; then
|
||||
echo "$prefer"
|
||||
return 0
|
||||
fi
|
||||
|
||||
warn "Edition '$EDITION' is not supported by this image, using automatic selection instead."
|
||||
fi
|
||||
|
||||
prefer="$id-enterprise"
|
||||
hasVersion "$prefer" "$tag" "$xml" && echo "$prefer" && return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user