Update install.sh

This commit is contained in:
Kroese
2026-07-28 15:46:32 +02:00
committed by GitHub
parent cd9746fdf6
commit 407af5b9d0
+53 -3
View File
@@ -599,6 +599,49 @@ extractESD() {
return 1
}
extractModernImage() {
local iso="$1"
local dir="$2"
if ! rm -rf -- "$dir"; then
error "Failed to remove directory \"$dir\" !"
return 1
fi
if ! makeDir "$dir"; then
error "Failed to create directory \"$dir\" !"
return 1
fi
if ! 7z x "$iso" \
-o"$dir" \
-ir!"sources/boot.wim" \
-ir!"boot/etfsboot.com" \
-ir!"efi/microsoft/boot/efisys_noprompt.bin" \
> /dev/null; then
error "Failed to extract required files from ISO: $iso"
return 1
fi
if [ ! -f "$dir/sources/boot.wim" ]; then
error "Failed to extract sources/boot.wim from ISO!"
return 1
fi
if [ ! -f "$dir/boot/etfsboot.com" ]; then
error "Failed to extract boot/etfsboot.com from ISO!"
return 1
fi
if [ ! -f "$dir/efi/microsoft/boot/efisys_noprompt.bin" ]; then
error "Failed to extract EFI boot image from ISO!"
return 1
fi
return 0
}
extractImage() {
local iso="$1"
@@ -1333,9 +1376,16 @@ fi
DIR="$TMP/unpack"
if ! extractImage "$ISO" "$DIR" "$VERSION"; then
rm -f "$ISO" 2> /dev/null || true
exit 62
if enabled "${ISO_TEST:-}"; then
if ! extractModernImage "$ISO" "$DIR" "$VERSION"; then
rm -f "$ISO" 2> /dev/null || true
exit 62
fi
else
if ! extractImage "$ISO" "$DIR" "$VERSION"; then
rm -f "$ISO" 2> /dev/null || true
exit 62
fi
fi
if ! detectImage "$DIR" "$VERSION"; then