From 657e924ad853e099cbc36be50478e9877aa05a25 Mon Sep 17 00:00:00 2001 From: Ning Shang Date: Thu, 20 May 2021 12:17:04 -0700 Subject: [PATCH] iso-image: More concise code for fixed order mmd and mcopy operations Thanks @misuzu for the suggestions. --- nixos/modules/installer/cd-dvd/iso-image.nix | 12 ++---------- 1 file 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 c3d12bda28d7..62fc097f9ddb 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