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