Update install.sh

This commit is contained in:
Kroese 2024-02-01 13:52:55 +01:00 committed by GitHub
parent 2afe1ab14d
commit 0dd2dc0163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -458,6 +458,7 @@ extractImage() {
detectImage() {
XML=""
local dir="$1"
if [ -n "$CUSTOM" ]; then
DETECTED=""
@ -474,29 +475,32 @@ detectImage() {
return 0
fi
local dsc
dsc=$(printVersion "$DETECTED")
[ -z "$dsc" ] && dsc="$DETECTED"
if [[ "${DETECTED,,}" != "winxp"* ]]; then
local dsc
dsc=$(printVersion "$DETECTED")
[ -z "$dsc" ] && dsc="$DETECTED"
warn "got $dsc, but no matching XML file exists, $FB."
fi
warn "got $dsc, but no matching XML file exists, $FB."
return 0
fi
info "Detecting Windows version from ISO image..."
local dir="$1"
if [ -f "$dir/WIN51" ] || [ -f "$dir/SETUPXP.HTM" ]; then
DETECTED="winxpx86"
info "Detected: Windows XP"
return 0
fi
local tag result name name2 desc
local loc="$dir/sources/install.wim"
[ ! -f "$loc" ] && loc="$dir/sources/install.esd"
if [ ! -f "$loc" ]; then
if [ -f "$dir/WIN51" ] || [ -f "$dir/SETUPXP.HTM" ]; then
DETECTED="winxpx86"
info "Detected: Windows XP"
return 0
fi
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"
BOOT_MODE="windows_legacy"
return 1