mirror of
https://github.com/ValdikSS/windows2usb.git
synced 2023-08-10 21:13:16 +03:00
Fix install.wim existance check and extraction for Windows 7
Three bugs: * Bash [ -a ] and [ ! -a ] are two different operations: the first checks for file existance, the second is a binary AND operation. Replace it with -e, which is consistent. * Mount ISO before checking its contents * Ensure that we extract the latest version of the wim/esd file (7z always replace) Fixes #35
This commit is contained in:
parent
964443265f
commit
4abb52133f
@ -174,11 +174,11 @@ function extract_bootmgfw_from_installwim() {
|
||||
# $2 - isomountpath
|
||||
# $3 - destdir
|
||||
|
||||
local fpath="$2/sources/install.wim"
|
||||
[ ! -a "$fpath" ] && fpath="$2/sources/install.esd"
|
||||
|
||||
mount -o ro "$1" "$2"
|
||||
7z e "$fpath" -o"$3/efi/boot/" '?/Windows/Boot/EFI/bootmgfw.efi'
|
||||
local fpath="$2/sources/install.wim"
|
||||
[ ! -e "$fpath" ] && fpath="$2/sources/install.esd"
|
||||
|
||||
7z e "$fpath" -aoa -o"$3/efi/boot/" '?/Windows/Boot/EFI/bootmgfw.efi'
|
||||
umount "$2"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user