From 0c67f190b188ba25fc087bfae33eedcc5235a762 Mon Sep 17 00:00:00 2001 From: Martin Schwaighofer Date: Sun, 21 Aug 2022 19:15:20 +0200 Subject: [PATCH] sd-image: remove unnecessary subshell replace the subshell surrounding this block with cd before and after Co-authored-by: Sandro --- nixos/modules/installer/sd-card/sd-image.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/sd-card/sd-image.nix b/nixos/modules/installer/sd-card/sd-image.nix index c6b5e43ee1f0..ad9b803b1d1e 100644 --- a/nixos/modules/installer/sd-card/sd-image.nix +++ b/nixos/modules/installer/sd-card/sd-image.nix @@ -233,14 +233,15 @@ in find firmware -exec touch --date=2000-01-01 {} + # Copy the populated /boot/firmware into the SD image - (cd firmware; + cd firmware # Force a fixed order in mcopy for better determinism, and avoid file globbing for d in $(find . -type d -mindepth 1 | sort); do faketime "2000-01-01 00:00:00" mmd -i ../firmware_part.img "::/$d" done for f in $(find . -type f | sort); do mcopy -pvm -i ../firmware_part.img "$f" "::/$f" - done) + done + cd .. # Verify the FAT partition before copying it. fsck.vfat -vn firmware_part.img