From e772dfd6d2849892ec03f611f621336676cf8b2b Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 24 Nov 2020 12:16:16 +0100 Subject: binary_iso: Execute mkdir binary/.disk before writing to it Before commit 9f3e5fe8d (Fix the way the .disk/mkisofs file is created) all these commands (`mkdir`, write to `binary/.disk/mkisofs` and `xorriso`) were in the same `binary.sh` script. Since that commit, the write was extracted, to prevent issues with quoting, but the related mkdir was left in `binary.sh`. This means that the write is now executed first, and the `mkdir` only afterwards, making the `mkdir` quite pointless. In practice, this did not break becaue binary_disk also does the same `mkdir` and runs before `binary_iso`, but if one runs commands manually and skips `binary_iso`, then this does break. Even though this is not really a supported usecase, just move the mkdir outside of `binary.sh`, so it runs *before* the write again as intended. --- scripts/build/binary_iso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso index e5724c32c..bf6d9b29d 100755 --- a/scripts/build/binary_iso +++ b/scripts/build/binary_iso @@ -167,11 +167,11 @@ esac cat > binary.sh << EOF #!/bin/sh -mkdir -p binary/.disk xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary EOF # retain the xorriso command used to create the image in the image itself +mkdir -p binary/.disk cat <<-EOF >binary/.disk/mkisofs xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary EOF -- cgit v1.2.3