Update install.sh

This commit is contained in:
Kroese 2024-05-03 04:02:46 +02:00 committed by GitHub
parent e58f4c432c
commit e62d790f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,7 +172,8 @@ detectCustom() {
if [[ "${VERSION,,}" != "http"* ]]; then
file="${VERSION/\/storage\//}"
[[ "$file" == "."* ]] && file="${file:1}"
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname "$file" -printf "%f\n" | head -n 1)
[[ "$file" == *"/"* ]] && file=""
[ -n "$file" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname "$file" -printf "%f\n" | head -n 1)
fi
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso -printf "%f\n" | head -n 1)