From e9343db75f1ee84c59de344c7f8b86bd57b88bfc Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:20:48 -0400 Subject: [PATCH] fail fast (#216) * fail fast * More of bash magic --------- Co-authored-by: rusefillc --- firmware/boards/f0_module/build_wideband.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/boards/f0_module/build_wideband.sh b/firmware/boards/f0_module/build_wideband.sh index 5caa5ec..64c1bb1 100755 --- a/firmware/boards/f0_module/build_wideband.sh +++ b/firmware/boards/f0_module/build_wideband.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -o pipefail # first build the bootloader cd bootloader @@ -31,6 +31,7 @@ arm-none-eabi-objcopy -I binary -O binary --gap-fill 0xFF --pad-to 0x63FC build/ # compute the crc and write that to a file (in binary) crc32 build/wideband_fullsize_nocrc.bin | xxd -r -p - > build/wideband_crc.bin +[ $? -eq 0 ] || { echo "crc32 computation failed"; exit 1; } # Now glue the image and CRC together cat build/wideband_fullsize_nocrc.bin build/wideband_crc.bin > build/wideband_image.bin