diff --git a/tools/initialFlash.sh b/tools/initialFlash.sh index 9489e56..ebcf25c 100755 --- a/tools/initialFlash.sh +++ b/tools/initialFlash.sh @@ -19,6 +19,16 @@ if [ $# -ne 1 ]; then fi FILES="displayword.lua main.lua timecore.lua webpage.lua webserver.lua wordclock.lua init.lua" +# Format filesystem first +echo "Format the complete ESP" +$LUATOOL -p $DEVICE -w +if [ $? -ne 0 ]; then + echo "STOOOOP" + exit 1 +fi + +echo +echo "Start Flasing ..." for f in $FILES; do if [ ! -f $f ]; then echo "Cannot find $f" @@ -33,4 +43,7 @@ for f in $FILES; do fi done +echo "Reboot the ESP" +$LUATOOL -p $DEVICE -r + exit 0