feat: Check path to boot.iso (#184)
This commit is contained in:
parent
03115137c8
commit
65fd7c839c
1 changed files with 8 additions and 3 deletions
|
@ -165,11 +165,16 @@ convertImage() {
|
||||||
|
|
||||||
findFile() {
|
findFile() {
|
||||||
|
|
||||||
local ext="$1"
|
|
||||||
local file
|
local file
|
||||||
|
local ext="$1"
|
||||||
|
local fname="boot.$ext"
|
||||||
|
|
||||||
file=$(find / -maxdepth 1 -type f -iname "boot.$ext" | head -n 1)
|
if [ -d "/$fname" ]; then
|
||||||
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "boot.$ext" | head -n 1)
|
warn "The file /$fname has an invalid path!"
|
||||||
|
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
|
detectType "$file" && return 0
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue