Merge pull request #2015 from meshtastic/master

Fix shell scripts for both linux and darwin
This commit is contained in:
Ben Meadors 2022-12-03 08:25:29 -06:00 committed by GitHub
commit b1f3e117d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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}

View File

@ -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