Optimized compile script

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-08 11:11:08 +02:00
parent 562f510e82
commit 8480f109d9

View File

@ -4,6 +4,7 @@
# set variables # set variables
ARDUINO_PATH="/bin/arduino"; ARDUINO_PATH="/bin/arduino";
MAIN_FILE="$(dirname "$(readlink -f "${0}")")/../main/main.ino"
# test preconditions # test preconditions
if [ ! -f "$ARDUINO_PATH" ] if [ ! -f "$ARDUINO_PATH" ]
@ -13,4 +14,5 @@ then
echo "https://askubuntu.com/questions/1025753/how-to-install-latest-arduino-ide" echo "https://askubuntu.com/questions/1025753/how-to-install-latest-arduino-ide"
exit 1; exit 1;
fi fi
bash "$ARDUINO_PATH" --upload ../main/main.ino echo "Compiling $MAIN_FILE..."
bash "$ARDUINO_PATH" --upload "$MAIN_FILE"