From 7570cdbd227fe6fcf04d5d8b5cd9597cbea21fcf Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 3 Dec 2022 08:24:11 -0600 Subject: [PATCH] Fix shell scripts for both linux and darwin --- 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 2904f1e0d..ca60740ab 100755 --- a/bin/device-install.sh +++ b/bin/device-install.sh @@ -45,7 +45,7 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ] && [ "${FILENAME##*"update"*}" == "$FILENAME" ]; then +if [ -f "${FILENAME}" ] && [ ! -z "${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 47ac8595f..7233f61f6 100755 --- a/bin/device-update.sh +++ b/bin/device-update.sh @@ -43,7 +43,7 @@ shift "$((OPTIND-1))" shift } -if [ -f "${FILENAME}" ] && [ "${FILENAME##*"update"*}" != "$FILENAME" ]; then +if [ -f "${FILENAME}" ] && [ -z "${FILENAME##*"update"*}" ]; then printf "Trying to flash update ${FILENAME}" $PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME} else