Update install.sh

This commit is contained in:
Kroese 2025-02-28 03:50:27 +01:00 committed by GitHub
parent 18a06474e4
commit 9adc5c6c14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,15 +165,16 @@ convertImage() {
findFile() { findFile() {
local ext="$1"
local file local file
local ext="$1"
local fname="boot.$ext"
if [ -d "/boot.$ext" ]; then if [ -d "/$fname" ]; then
warn "The file /boot.$ext has an invalid path!" warn "The file /$fname has an invalid path!"
fi fi
file=$(find / -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 "boot.$ext" | head -n 1) [ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" | head -n 1)
detectType "$file" && return 0 detectType "$file" && return 0
return 1 return 1