Update install.sh

This commit is contained in:
Kroese 2024-02-16 14:06:47 +01:00 committed by GitHub
parent fcd7fbd4f3
commit ec78fa856e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -484,9 +484,16 @@ detectImage() {
info "Detecting Windows version from ISO image..." info "Detecting Windows version from ISO image..."
local src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
if [ ! -d "$src" ]; then
warn "failed to locate 'sources' folder in ISO image, $FB"
return 0
fi
local tag result name name2 desc local tag result name name2 desc
local loc="$dir/sources/install.wim" local loc=$(find "$src" -maxdepth 1 -type f -iname install.wim | head -n 1)
[ ! -f "$loc" ] && loc="$dir/sources/install.esd" [ ! -f "$loc" ] && loc=$(find "$src" -maxdepth 1 -type f -iname install.esd | head -n 1)
if [ ! -f "$loc" ]; then if [ ! -f "$loc" ]; then
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"