Update install.sh

This commit is contained in:
Kroese 2024-01-26 21:06:38 +01:00 committed by GitHub
parent e91568a411
commit cccaa03133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -346,36 +346,33 @@ findVersion() {
detectImage() { detectImage() {
local dir="$1"
local try=""
local tag result name name2
XML="" XML=""
if [ -n "$DETECTED" ]; then if [ -n "$CUSTOM" ]; then
try="y" DETECTED=""
else else
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then if [ -z "$DETECTED" ] && [[ "$EXTERNAL" != [Yy1]* ]]; then
if [[ "${VERSION,,}" != "win10x64-enterprise-ltsc-eval" ]]; then if [[ "${VERSION,,}" != "win10x64-enterprise-ltsc-eval" ]]; then
DETECTED="$VERSION" DETECTED="$VERSION"
else else
DETECTED="win10x64-ltsc" DETECTED="win10x64-ltsc"
fi fi
try="y"
fi fi
fi fi
if [[ "$try" == "y" ]]; then if [ -n "$DETECTED" ]; then
[[ "$MANUAL" == [Yy1]* ]] && return 0
if [ -f "/run/assets/$DETECTED.xml" ]; then if [ -f "/run/assets/$DETECTED.xml" ]; then
XML="$DETECTED.xml" [[ "$MANUAL" != [Yy1]* ]] && XML="$DETECTED.xml"
return 0 return 0
fi fi
warn "image type is '$DETECTED', but no matching XML file exists!" warn "image type is '$DETECTED', but no matching XML file exists!"
return 0
fi fi
info "Detecting Windows version from ISO image..." info "Detecting Windows version from ISO image..."
local dir="$1"
local tag result name name2
local loc="$dir/sources/install.wim" local loc="$dir/sources/install.wim"
[ ! -f "$loc" ] && loc="$dir/sources/install.esd" [ ! -f "$loc" ] && loc="$dir/sources/install.esd"
@ -424,7 +421,7 @@ prepareImage() {
local iso="$1" local iso="$1"
local dir="$2" local dir="$2"
if [[ "${DETECTED,,}" != "win7x64"* ]] && [[ "${DETECTED,,}" != "winvistax64"* ]] && [[ "${DETECTED,,}" != "winxpx64"* ]]; then if [[ "${DETECTED,,}" != "win7x64"* ]]; then
return 0 return 0
fi fi