From 9adc5c6c14f941f468e5212b9c2e79c8df82ed1a Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 28 Feb 2025 03:50:27 +0100 Subject: [PATCH] Update install.sh --- src/install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/install.sh b/src/install.sh index fc354e8..185f2ae 100644 --- a/src/install.sh +++ b/src/install.sh @@ -165,15 +165,16 @@ convertImage() { findFile() { - local ext="$1" local file + local ext="$1" + local fname="boot.$ext" - if [ -d "/boot.$ext" ]; then - warn "The file /boot.$ext has an invalid path!" + if [ -d "/$fname" ]; then + warn "The file /$fname has an invalid path!" fi - file=$(find / -maxdepth 1 -type f -iname "boot.$ext" | head -n 1) - [ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "boot.$ext" | head -n 1) + file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1) + [ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" | head -n 1) detectType "$file" && return 0 return 1