mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 04:05:50 +00:00
Update install.sh
This commit is contained in:
parent
6e1a387183
commit
7e338479b2
1 changed files with 5 additions and 5 deletions
|
|
@ -513,7 +513,7 @@ detectImage() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local src loc info
|
local src wim info
|
||||||
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
|
||||||
|
|
||||||
if [ ! -d "$src" ]; then
|
if [ ! -d "$src" ]; then
|
||||||
|
|
@ -521,15 +521,15 @@ detectImage() {
|
||||||
warn "failed to locate 'sources' folder in ISO image, $FB" && return 1
|
warn "failed to locate 'sources' folder in ISO image, $FB" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
|
wim=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
|
||||||
[ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)
|
[ ! -f "$wim" ] && wim=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)
|
||||||
|
|
||||||
if [ ! -f "$loc" ]; then
|
if [ ! -f "$wim" ]; then
|
||||||
[[ "${PLATFORM,,}" == "x64" ]] && BOOT_MODE="windows_legacy"
|
[[ "${PLATFORM,,}" == "x64" ]] && BOOT_MODE="windows_legacy"
|
||||||
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1
|
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info=$(wimlib-imagex info -xml "$loc" | tr -d '\000')
|
info=$(wimlib-imagex info -xml "$wim" | tr -d '\000')
|
||||||
! checkPlatform "$info" && exit 67
|
! checkPlatform "$info" && exit 67
|
||||||
|
|
||||||
DETECTED=$(detectVersion "$info")
|
DETECTED=$(detectVersion "$info")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue