Fix conditional syntax

raytac-diy
Ben Meadors 2022-11-26 14:23:23 -06:00
rodzic b82ab34f85
commit e7dbbeb606
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

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