Update install.sh

This commit is contained in:
Kroese 2024-05-05 19:51:40 +02:00 committed by GitHub
parent d4c173988a
commit 347a9151f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -536,15 +536,21 @@ extractESD() {
local edition imageIndex imageEdition local edition imageIndex imageEdition
case "${version,,}" in edition=$(printVersion "$version" "")
"win11${PLATFORM,,}" ) edition="11 pro" ;; edition="${edition/ (Evaluation)/}"
"win10${PLATFORM,,}" ) edition="10 pro" ;;
*) error "Invalid VERSION specified, value \"$version\" is not recognized!" && return 1 ;; if [ -z "$edition" ] || ! isESD "${version,,}"; then
esac error "Invalid VERSION specified, value \"$version\" is not recognized!" && return 1
fi
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
imageEdition=$(wimlib-imagex info "${iso}" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//') imageEdition=$(wimlib-imagex info "${iso}" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//')
[[ "${imageEdition,,}" != *"$edition"* ]] && continue error "$imageEdition"
done
for (( imageIndex=4; imageIndex<=esdImageCount; imageIndex++ )); do
imageEdition=$(wimlib-imagex info "${iso}" ${imageIndex} | grep '^Description:' | sed 's/Description:[ \t]*//')
[[ "${imageEdition,,}" != *"${edition,,}"* ]] && continue
wimlib-imagex export "${iso}" ${imageIndex} "${installWimFile}" --compress=LZMS --chunk-size 128K --quiet || { wimlib-imagex export "${iso}" ${imageIndex} "${installWimFile}" --compress=LZMS --chunk-size 128K --quiet || {
retVal=$? retVal=$?
error "Addition of ${imageIndex} to the $desc image failed" && return $retVal error "Addition of ${imageIndex} to the $desc image failed" && return $retVal
@ -552,7 +558,7 @@ extractESD() {
return 0 return 0
done done
error "Failed to find product in install.wim!" && return 1 error "Failed to find product '$edition' in install.wim!" && return 1
} }
extractImage() { extractImage() {