From 6e8a35307ea4d596df8b20145e076c3eb61ec564 Mon Sep 17 00:00:00 2001 From: ollo Date: Sun, 3 Jul 2016 18:41:09 +0200 Subject: [PATCH] Automatically reboot the device after the inital flash --- tools/initialFlash.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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