Indention improved

This commit is contained in:
ollo 2020-03-06 23:55:14 +01:00
parent 344fb0ab9a
commit b5f46a14d2
2 changed files with 28 additions and 26 deletions

View File

@ -3,6 +3,7 @@
LUATOOL=./tools/luatool.py LUATOOL=./tools/luatool.py
DEVICE=$1 DEVICE=$1
BAUD=115200
# check the serial connection # check the serial connection
@ -19,30 +20,31 @@ if [ $# -eq 0 ]; then
fi fi
if [ $# -eq 1 ]; then if [ $# -eq 1 ]; then
FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua" FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua telnet.lua wordclock.lua init.lua"
else else
FILES=$2 FILES=$2
fi fi
# Format filesystem first # Format filesystem first
#echo "Format the complete ESP" echo "Format the complete ESP"
#$LUATOOL -p $DEVICE -w -b 115200 $LUATOOL -p $DEVICE -w -b $BAUD
#if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
# echo "STOOOOP" echo "STOOOOP"
# exit 1 exit 1
#fi fi
echo "Reboot the ESP" #stty -F $DEVICE $BAUD
echo "node.restart()" >> $DEVICE #echo "Reboot the ESP"
sleep 1 #echo "node.restart()" >> $DEVICE
for i in $(seq 0 5); do #sleep 1
echo "Stop TMR $i" #for i in $(seq 0 5); do
echo "tmr.stop($i)" >> $DEVICE # echo "Stop TMR $i"
sleep 1 # echo "tmr.stop($i)" >> $DEVICE
done # sleep 1
#done
echo #echo
echo "Start Flasing ..." echo "Start Flasing ..."
for f in $FILES; do for f in $FILES; do
if [ ! -f $f ]; then if [ ! -f $f ]; then
@ -51,7 +53,7 @@ for f in $FILES; do
exit 1 exit 1
fi fi
echo "------------- $f ------------" echo "------------- $f ------------"
$LUATOOL -p $DEVICE -f $f -b 115200 -t $f $LUATOOL -p $DEVICE -f $f -b $BAUD -t $f
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "STOOOOP" echo "STOOOOP"
exit 1 exit 1