Loading src/install.sh +13 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,9 @@ detectType() { if [ -n "$dir" ]; then dir=$(echo "${dir^^}" | grep "^/EFI") [ -z "$dir" ] && BOOT_MODE="legacy" if [ -z "$dir" ] && [ -z "$BOOT_MODE" ]; then BOOT_MODE="legacy" fi else error "Failed to read ISO file, invalid format!" fi Loading Loading @@ -197,16 +199,23 @@ convertImage() { findFile() { local file local dir file local ext="$1" local fname="boot.$ext" if [ -d "/$fname" ]; then error "The file /$fname does not exist, please make sure that you mapped it to a valid path!" && exit 37 dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1) [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1) if [ -d "$dir" ]; then if hasDisk; then BOOT="$dir" && return 0 fi error "The bind $dir maps to a file that does not exist!" && exit 37 fi 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 Loading Loading
src/install.sh +13 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,9 @@ detectType() { if [ -n "$dir" ]; then dir=$(echo "${dir^^}" | grep "^/EFI") [ -z "$dir" ] && BOOT_MODE="legacy" if [ -z "$dir" ] && [ -z "$BOOT_MODE" ]; then BOOT_MODE="legacy" fi else error "Failed to read ISO file, invalid format!" fi Loading Loading @@ -197,16 +199,23 @@ convertImage() { findFile() { local file local dir file local ext="$1" local fname="boot.$ext" if [ -d "/$fname" ]; then error "The file /$fname does not exist, please make sure that you mapped it to a valid path!" && exit 37 dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1) [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1) if [ -d "$dir" ]; then if hasDisk; then BOOT="$dir" && return 0 fi error "The bind $dir maps to a file that does not exist!" && exit 37 fi 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 Loading