update batch scripts to further check filename.

This commit is contained in:
Thomas Göttgens
2022-11-26 17:00:33 +01:00
parent 185ceac9df
commit 082aa07e7f
4 changed files with 15 additions and 7 deletions
+4 -1
View File
@@ -26,12 +26,15 @@ IF "__%FILENAME%__" == "____" (
echo "Missing FILENAME"
goto HELP
)
IF EXIST %FILENAME% (
IF EXIST %FILENAME% IF NOT x%FILENAME:update=%==x%FILENAME% (
echo Trying to flash update %FILENAME%
%PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME%
) else (
echo "Invalid file: %FILENAME%"
goto HELP
) else (
echo "Invalid file: %FILENAME%"
goto HELP
)
:EOF