tools/mk7z: tweak manifest handling code

To support mawk (default awk on debian unstable).
This commit is contained in:
Benoit Pierre
2024-05-11 23:02:18 +02:00
committed by Frans de Jonge
parent e921ed1bc7
commit 2d4b12c99c

View File

@@ -45,7 +45,7 @@ if [[ -r "${archive}" ]]; then
<(
"${sevenzip}" -slt l "${archive}" |
awk '
/^(\w+) = / { entry[$1] = $3; }
/^([^=]+) = / { entry[$1] = $3; }
/^CRC =/ { if ($3!="") print entry["Path"], entry["Size"], $3; else print entry["Path"] }
' | sort
) --label 'to add' "${manifest}"; then