brakeconf/build.sh

21 lines
516 B
Bash
Raw Normal View History

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