Automatically reboot the device after the inital flash

This commit is contained in:
ollo 2016-07-03 18:41:09 +02:00
parent eebe794df2
commit 6e8a35307e

View File

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