iso-image: More concise code for fixed order mmd and mcopy operations

Thanks @misuzu for the suggestions.
This commit is contained in:
Ning Shang 2021-05-20 12:17:04 -07:00
parent 4db7eb476f
commit 657e924ad8
No known key found for this signature in database
GPG key ID: 3C611CCC3C31E6E8

View file

@ -418,19 +418,11 @@ let
faketime "2000-01-01 00:00:00" mkfs.vfat -i 12345678 -n EFIBOOT "$out"
# Force a fixed order in mcopy for better determinism, and avoid file globbing
for d in $(find EFI -type d | sort); do
for d in $(find EFI boot -type d | sort); do
faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d"
done
for d in $(find boot -type d | sort); do
faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d"
done
for f in $(find EFI -type f | sort); do
mcopy -pvm -i "$out" "$f" "::/$f"
done
for f in $(find boot -type f | sort); do
for f in $(find EFI boot -type f | sort); do
mcopy -pvm -i "$out" "$f" "::/$f"
done