From c358bf0f0defacd58a981d22f938cba02f3158eb Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 14 Apr 2025 20:11:10 +0200 Subject: [PATCH] feat: Support boot.iso files --- src/install.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/install.sh b/src/install.sh index 1c973f3..cb07df7 100644 --- a/src/install.sh +++ b/src/install.sh @@ -222,14 +222,12 @@ abortInstall() { return 1 } -detectCustom() { +findFile() { local dir file base - local fname="custom.iso" + local fname="$1" local boot="$STORAGE/windows.boot" - CUSTOM="" - dir=$(find / -maxdepth 1 -type d -iname "$fname" -print -quit) [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" -print -quit) @@ -256,12 +254,25 @@ detectCustom() { [ -z "$size" ] || [[ "$size" == "0" ]] && return 0 ISO="$file" - CUSTOM="$ISO" + CUSTOM="$file" BOOT="$STORAGE/windows.$size.iso" return 0 } +detectCustom() { + + CUSTOM="" + + ! findFile "custom.iso" && return 1 + [ -n "$CUSTOM" ] && return 0 + + ! findFile "boot.iso" && return 1 + [ -n "$CUSTOM" ] && return 0 + + return 0 +} + extractESD() { local iso="$1"