From e7dbbeb606f4300fab7d4b7555763cb1ca236bc7 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 26 Nov 2022 14:23:23 -0600 Subject: [PATCH] Fix conditional syntax --- bin/device-install.sh | 2 +- bin/device-update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/device-install.sh b/bin/device-install.sh index bc14d440b..10074d9a5 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -45,7 +45,7 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ] && [ "${FILENAME}" != *"update"* ]; then +if [ -f "${FILENAME}" ] && [[ "${FILENAME}" != *"update"* ]]; then echo "Trying to flash ${FILENAME}, but first erasing and writing system information" "$PYTHON" -m esptool erase_flash "$PYTHON" -m esptool write_flash 0x00 ${FILENAME} diff --git a/bin/device-update.sh b/bin/device-update.sh index 0959f0e3c..2012eb357 100755 --- a/bin/device-update.sh +++ b/bin/device-update.sh @@ -43,7 +43,7 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ] && [ $FILENAME == *"update"* ]; then +if [ -f "${FILENAME}" ] && [[ $FILENAME == *"update"* ]]; then printf "Trying to flash update ${FILENAME}" $PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME} else