Skip to content

Commit

Permalink
Fixed shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern committed Nov 27, 2022
1 parent abe60b9 commit f1179d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/device-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ shift "$((OPTIND-1))"
shift
}

if [ -f "${FILENAME}" ] && [[ "${FILENAME}" != *"update"* ]]; then
if [ -f "${FILENAME}" ] && [ "${FILENAME##*"update"*}" == "$FILENAME" ]; 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}
Expand Down
2 changes: 1 addition & 1 deletion bin/device-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ shift "$((OPTIND-1))"
shift
}

if [ -f "${FILENAME}" ] && [[ $FILENAME == *"update"* ]]; then
if [ -f "${FILENAME}" ] && [ "${FILENAME##*"update"*}" != "$FILENAME" ]; then
printf "Trying to flash update ${FILENAME}"
$PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME}
else
Expand Down

0 comments on commit f1179d3

Please sign in to comment.