diff options
author | Ning Shang <syncom.dev@gmail.com> | 2021-05-20 12:17:04 -0700 |
---|---|---|
committer | Ning Shang <syncom.dev@gmail.com> | 2021-05-20 12:17:04 -0700 |
commit | 657e924ad853e099cbc36be50478e9877aa05a25 (patch) | |
tree | 32d3c960af4b4f6c6cb6179bb9d416f4d86d4f9d /nixos/modules/installer/cd-dvd | |
parent | 4db7eb476f30a819eacd1459d78bf8fe5b3bccb3 (diff) |
iso-image: More concise code for fixed order mmd and mcopy operations
Thanks @misuzu for the suggestions.
Diffstat (limited to 'nixos/modules/installer/cd-dvd')
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index c3d12bda28d71..62fc097f9ddbe 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -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 |