This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 60e144d8f hw/scripts: Fix downloader script syntax
60e144d8f is described below
commit 60e144d8f8034d413184e0463abec7e522f0b415
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Fri Jun 9 21:15:37 2023 +0200
hw/scripts: Fix downloader script syntax
Space was missing in several if conditions between " and ]
---
hw/scripts/download.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/scripts/download.sh b/hw/scripts/download.sh
index aa723a869..20489210a 100644
--- a/hw/scripts/download.sh
+++ b/hw/scripts/download.sh
@@ -30,7 +30,7 @@
# - BOOT_LOADER is set if downloading a bootloader
if [ "$MFG_IMAGE" ]; then
- if [ -z "$MYNEWT_VAL_MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET"] ; then
+ if [ -z "$MYNEWT_VAL_MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET" ] ; then
>&2 echo "Syscfg value MYNEWT_DOWNLOADER_MFG_IMAGE_FLASH_OFFSET not set"
exit -1
fi
@@ -45,7 +45,7 @@ case "${MYNEWT_VAL_MYNEWT_DOWNLOADER}" in
;;
"jlink")
. $CORE_PATH/hw/scripts/jlink.sh
- if [ -z "${MYNEWT_VAL_JLINK_TARGET}"] ; then
+ if [ -z "${MYNEWT_VAL_JLINK_TARGET}" ] ; then
>&2 echo -e "\n\nSyscfg value MYNEWT_DOWNLOADER set to 'jlink' but
JLINK_TARGET not set in syscfg."
exit -1
fi
@@ -69,7 +69,7 @@ case "${MYNEWT_VAL_MYNEWT_DOWNLOADER}" in
if [ -n "${MYNEWT_VAL_MYNEWT_DOWNLOADER_OPENOCD_CFG}" ] ; then
CFG="${CFG} -s $BSP_PATH -f ${MYNEWT_VAL_MYNEWT_DOWNLOADER_OPENOCD_CFG}"
fi
- if [ -z "${CFG}"] ; then
+ if [ -z "${CFG}" ] ; then
>&2 echo -e "\n\nSyscfg value MYNEWT_DOWNLOADER set to 'openocd' but
none of the following syscfg values is not set:"
>&2 echo -e
"\tMYNEWT_DOWNLOADER_OPENOCD_INTERFACE\n\tMYNEWT_DOWNLOADER_OPENOCD_BOARD\n\tMYNEWT_DOWNLOADER_OPENOCD_CFG"
exit -1
@@ -99,4 +99,8 @@ case "${MYNEWT_VAL_MYNEWT_DOWNLOADER}" in
common_file_to_load
stlink_load
;;
+ *)
+ >&2 echo "Unknown downlaoder $MYNEWT_VAL_MYNEWT_DOWNLOADER"
+ exit 1
+ ;;
esac