From 0dd2dc0163ed8584e72d25bfc8fd5e5b825ee8d5 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 1 Feb 2024 13:52:55 +0100 Subject: [PATCH] Update install.sh --- src/install.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/install.sh b/src/install.sh index 7ed9970..4644c32 100644 --- a/src/install.sh +++ b/src/install.sh @@ -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