mirror of
https://github.com/dockur/windows.git
synced 2026-08-04 04:57:13 +01:00
Update image.sh
This commit is contained in:
+3
-3
@@ -985,7 +985,6 @@ parseWimHeader() {
|
|||||||
local parsed_offset=0
|
local parsed_offset=0
|
||||||
local parsed_original=0
|
local parsed_original=0
|
||||||
local parsed_flags=0
|
local parsed_flags=0
|
||||||
|
|
||||||
local -a bytes=()
|
local -a bytes=()
|
||||||
|
|
||||||
offset_ref=""
|
offset_ref=""
|
||||||
@@ -997,17 +996,18 @@ parseWimHeader() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! raw=$(od -An -j8 -N88 -tu1 -- "$header"); then
|
if ! raw=$(od -An -v -j8 -N88 -tu1 -- "$header"); then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r -a bytes <<< "$raw"
|
read -r -a bytes <<< "${raw//$'\n'/ }"
|
||||||
|
|
||||||
if (( ${#bytes[@]} != 88 )); then
|
if (( ${#bytes[@]} != 88 )); then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local i
|
local i
|
||||||
|
|
||||||
# The WIM header size is a 32-bit little-endian value at offset 0x08.
|
# The WIM header size is a 32-bit little-endian value at offset 0x08.
|
||||||
for ((i=3; i>=0; i--)); do
|
for ((i=3; i>=0; i--)); do
|
||||||
header_size=$((header_size * 256 + bytes[i]))
|
header_size=$((header_size * 256 + bytes[i]))
|
||||||
|
|||||||
Reference in New Issue
Block a user