From 2eeff70fc640c6bd2999890c161b277fd9f2a781 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 16 Feb 2024 14:30:38 +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 9a04264..2fec696 100644 --- a/src/install.sh +++ b/src/install.sh @@ -562,8 +562,15 @@ updateImage() { local path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1) [ -n "$path" ] && cp "$asset" "$path" - local loc="$dir/sources/boot.wim" - [ ! -f "$loc" ] && loc="$dir/sources/boot.esd" + 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 1 + fi + + local loc=$(find "$src" -maxdepth 1 -type f -iname boot.wim | head -n 1) + [ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname boot.esd | head -n 1) if [ ! -f "$loc" ]; then warn "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB"