From 81ed8665a66312be6787016c1c9fcd9bf6ee7be1 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 26 May 2024 19:53:30 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/install.sh b/src/install.sh index 9924c41..453550f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -488,7 +488,7 @@ detectImage() { local dir="$1" local version="$2" - local desc msg language + local desc msg find language XML="" @@ -515,14 +515,18 @@ detectImage() { info "Detecting version from ISO image..." - if [ -d "$dir/WIN98" ]; then + find=$(find "$dir" -maxdepth 1 -type d -iname win98 | head -n 1) + + if [ -n "$find" ]; then DETECTED="win98" desc=$(printEdition "$DETECTED" "Windows 98") info "Detected: $desc" return 0 fi - if [ -f "$dir/WIN51" ] || [ -f "$dir/SETUPXP.HTM" ]; then + find=$(find "$dir" -maxdepth 1 -type d -iname win51 | head -n 1) + + if [ -n "$find" ] || [ -f "$dir/SETUPXP.HTM" ]; then [ -d "$dir/AMD64" ] && DETECTED="winxpx64" || DETECTED="winxpx86" desc=$(printEdition "$DETECTED" "Windows XP") info "Detected: $desc"