From 6ca9da073df39f784240f56e4a2943ee72ffcaef Mon Sep 17 00:00:00 2001 From: Chris King-Parra Date: Wed, 7 Mar 2018 16:47:59 -0500 Subject: [PATCH] Quote parameter expansions in hex_with_bootloader() of bin/kaleidoscope-builder. Issue #299. --- bin/kaleidoscope-builder | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 839a577d..9023feab 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -114,19 +114,19 @@ hex_with_bootloader () { compile fi - cat ${HEX_FILE_PATH} | awk '/^:00000001FF/ == 0' > ${HEX_FILE_WITH_BOOTLOADER_PATH} + awk '/^:00000001FF/ == 0' "${HEX_FILE_PATH}" > "${HEX_FILE_WITH_BOOTLOADER_PATH}" echo "Using ${BOOTLOADER_PATH}" ${MD5} ${BOOTLOADER_PATH} - cat ${BOOTLOADER_PATH} >> ${HEX_FILE_WITH_BOOTLOADER_PATH} - ln -sf "${HEX_FILE_WITH_BOOTLOADER_PATH}" "${OUTPUT_PATH}/${SKETCH}-latest-with-bootloader.hex" - cat <> "${HEX_FILE_WITH_BOOTLOADER_PATH}" + ln -sf -- "${HEX_FILE_WITH_BOOTLOADER_PATH}" "${OUTPUT_PATH}/${SKETCH}-latest-with-bootloader.hex" + cat <<- EOF + + Combined firmware and bootloader are now at ${HEX_FILE_WITH_BOOTLOADER_PATH} + Make sure you have the bootloader version you expect. + + And TEST THIS ON REAL HARDWARE BEFORE YOU GIVE IT TO ANYONE + + EOF } build () {