brakeconf/build.sh

21 lines
489 B
Bash
Executable File

#!/bin/sh
clear
STEPS=' 4'
echo "[ 1/$STEPS] Cleaning..."
rm dist/* &> /dev/null
rm brakeconf &> /dev/null
echo "[ 2/$STEPS] Build GUI..."
python3 ./build_gui.py gui/index.html dist/index.html &> /dev/null
xxd -i -n app_html dist/index.html > src/html.h
# sed -i 's/unsigned char/const unsigned char/g' src/html.h
echo "[ 3/$STEPS] Compile..."
gcc -I./webui -o brakeconf src/main.c webui/libwebui-2-static.a -lserialport -ljansson
echo "[ 4/$STEPS] Running..."
./brakeconf icanthink