fail fast (#216)

* fail fast

* More of bash magic

---------

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-03-21 14:20:48 -04:00 committed by GitHub
parent e9b942df31
commit e9343db75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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