From ec78fa856e331f5aa770cf7f16721c0873836587 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 16 Feb 2024 14:06:47 +0100 Subject: [PATCH] Update install.sh --- src/install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index 0d93f0a..9a04264 100644 --- a/src/install.sh +++ b/src/install.sh @@ -484,9 +484,16 @@ detectImage() { info "Detecting Windows version from ISO image..." + local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1) + + if [ ! -d "$src" ]; then + warn "failed to locate 'sources' folder in ISO image, $FB" + return 0 + fi + local tag result name name2 desc - local loc="$dir/sources/install.wim" - [ ! -f "$loc" ] && loc="$dir/sources/install.esd" + local loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1) + [ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1) if [ ! -f "$loc" ]; then warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"