Update install.sh

This commit is contained in:
Kroese 2025-02-28 03:42:40 +01:00 committed by GitHub
parent 4c94dfcb0a
commit 4552f5fe2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,14 +200,16 @@ abortInstall() {
detectCustom() {
local file base
local fname="custom.iso"
CUSTOM=""
if [ -d "/custom.iso" ]; then
error "The file /custom.iso has an invalid path!" && return 1
if [ -d "/$fname" ]; then
error "The file /$fname has an invalid path!" && return 1
fi
file=$(find / -maxdepth 1 -type f -iname custom.iso | head -n 1)
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso | 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)
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
base=$(basename "$VERSION")