mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 03:45:48 +00:00
fix: Match files case insensitive
This commit is contained in:
parent
2b1e43ac21
commit
381a177880
1 changed files with 5 additions and 35 deletions
|
|
@ -90,15 +90,8 @@ if [[ "${VERSION,,}" == "tiny10" ]]; then
|
||||||
VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CUSTOM="custom.iso"
|
CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.iso | head -n 1 | xargs basename)
|
||||||
|
[ -z "$CUSTOM" ] && CUSTOM=$(find "$STORAGE" -maxdepth 1 -type f -iname custom.img | head -n 1 | xargs basename)
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.ISO"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.ISO"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.img"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.img"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
|
|
||||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
|
|
||||||
|
|
||||||
ESD_URL=""
|
ESD_URL=""
|
||||||
MACHINE="q35"
|
MACHINE="q35"
|
||||||
|
|
@ -205,31 +198,6 @@ getVersion() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
replaceXML() {
|
|
||||||
|
|
||||||
local dir="$1"
|
|
||||||
local asset="$2"
|
|
||||||
|
|
||||||
local path="$dir/autounattend.xml"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/Autounattend.xml"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/AutoUnattend.xml"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/autounattend.XML"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/Autounattend.XML"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/AutoUnattend.XML"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/AUTOUNATTEND.xml"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
path="$dir/AUTOUNATTEND.XML"
|
|
||||||
[ -f "$path" ] && cp "$asset" "$path"
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
hasDisk() {
|
hasDisk() {
|
||||||
|
|
||||||
[ -b "${DEVICE:-}" ] && return 0
|
[ -b "${DEVICE:-}" ] && return 0
|
||||||
|
|
@ -916,7 +884,9 @@ updateImage() {
|
||||||
local index result
|
local index result
|
||||||
|
|
||||||
[ ! -f "$asset" ] && return 0
|
[ ! -f "$asset" ] && return 0
|
||||||
replaceXML "$dir" "$asset"
|
|
||||||
|
local path=$(find "$dir" -maxdepth 1 -type f -iname autounattend.xml | head -n 1)
|
||||||
|
[ -n "$path" ] && cp "$asset" "$path"
|
||||||
|
|
||||||
local loc="$dir/sources/boot.wim"
|
local loc="$dir/sources/boot.wim"
|
||||||
[ ! -f "$loc" ] && loc="$dir/sources/boot.esd"
|
[ ! -f "$loc" ] && loc="$dir/sources/boot.esd"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue