config file can be uploaded with this script, too

This commit is contained in:
Ollo 2021-03-21 16:06:26 +01:00
parent 2e77516d43
commit 7939bf578d

View File

@ -37,6 +37,8 @@ else
FILES=$2 FILES=$2
fi fi
# Convert files, if necessary
if [ "$FILES" != "config.lua" ]; then
echo "Generate DIET version of the files" echo "Generate DIET version of the files"
OUTFILES="" OUTFILES=""
ROOTDIR=$PWD ROOTDIR=$PWD
@ -53,16 +55,7 @@ for f in $FILES; do
done done
FILES=$OUTFILES FILES=$OUTFILES
cd $ROOTDIR cd $ROOTDIR
if [ $# -eq 1 ]; then
# Format filesystem first
echo "Format the complete ESP"
python3 $LUATOOL -p $DEVICE -w -b $BAUD
if [ $? -ne 0 ]; then
echo "STOOOOP"
exit 1
fi fi
else
echo "Reboot ESP and stop init timer" echo "Reboot ESP and stop init timer"
if [ ! -f $LUASCRIPT_STOP ]; then if [ ! -f $LUASCRIPT_STOP ]; then
echo "Cannot find $LUASCRIPT_STOP" echo "Cannot find $LUASCRIPT_STOP"
@ -73,6 +66,15 @@ else
echo "Could not reboot" echo "Could not reboot"
exit 1 exit 1
fi fi
if [ $# -eq 1 ]; then
# Format filesystem first
echo "Format the complete ESP"
python3 $LUATOOL -p $DEVICE -w -b $BAUD
if [ $? -ne 0 ]; then
echo "STOOOOP"
exit 1
fi
fi fi
echo "Start Flasing ..." echo "Start Flasing ..."