mirror of
https://github.com/dockur/windows.git
synced 2025-03-27 12:08:31 +00:00
feat: Check path to custom .iso (#1069)
This commit is contained in:
parent
5ae6ecbe85
commit
e16af78828
@ -200,10 +200,16 @@ abortInstall() {
|
|||||||
detectCustom() {
|
detectCustom() {
|
||||||
|
|
||||||
local file base
|
local file base
|
||||||
|
local fname="custom.iso"
|
||||||
|
|
||||||
CUSTOM=""
|
CUSTOM=""
|
||||||
|
|
||||||
file=$(find / -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
if [ -d "/$fname" ]; then
|
||||||
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso | head -n 1)
|
error "The file /$fname has an invalid path!" && return 1
|
||||||
|
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)
|
||||||
|
|
||||||
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
|
if [ ! -s "$file" ] && [[ "${VERSION,,}" != "http"* ]]; then
|
||||||
base=$(basename "$VERSION")
|
base=$(basename "$VERSION")
|
||||||
@ -487,6 +493,10 @@ setXML() {
|
|||||||
|
|
||||||
local file="/custom.xml"
|
local file="/custom.xml"
|
||||||
|
|
||||||
|
if [ -d "$file" ]; then
|
||||||
|
warn "The file $file has an invalid path!"
|
||||||
|
fi
|
||||||
|
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
|
||||||
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"
|
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user