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
fi
# Convert files, if necessary
if [ "$FILES" != "config.lua" ]; then
echo "Generate DIET version of the files"
OUTFILES=""
ROOTDIR=$PWD
@ -53,16 +55,7 @@ for f in $FILES; do
done
FILES=$OUTFILES
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
else
echo "Reboot ESP and stop init timer"
if [ ! -f $LUASCRIPT_STOP ]; then
echo "Cannot find $LUASCRIPT_STOP"
@ -73,6 +66,15 @@ else
echo "Could not reboot"
exit 1
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
echo "Start Flasing ..."