fix: Match files case insensitive (#29)

This commit is contained in:
Kroese 2024-02-16 14:51:50 +01:00 committed by GitHub
parent f3baa08a21
commit 8c6e9d3d7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,14 +8,8 @@ else
PROGRESS="--progress=dot:giga" PROGRESS="--progress=dot:giga"
fi fi
BASE="boot.img" BASE=$(find "$STORAGE" -maxdepth 1 -type f -iname boot.iso -printf "%f\n" | head -n 1)
[ ! -f "$STORAGE/$BASE" ] && BASE="boot.iso" [ -z "$BASE" ] && BASE=$(find "$STORAGE" -maxdepth 1 -type f -iname boot.img -printf "%f\n" | head -n 1)
[ ! -f "$STORAGE/$BASE" ] && BASE="Boot.img"
[ ! -f "$STORAGE/$BASE" ] && BASE="Boot.iso"
[ ! -f "$STORAGE/$BASE" ] && BASE="boot.IMG"
[ ! -f "$STORAGE/$BASE" ] && BASE="boot.ISO"
[ ! -f "$STORAGE/$BASE" ] && BASE="BOOT.IMG"
[ ! -f "$STORAGE/$BASE" ] && BASE="BOOT.ISO"
[ -f "$STORAGE/$BASE" ] && return 0 [ -f "$STORAGE/$BASE" ] && return 0