1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-01-29 11:57:58 +01:00
Grbl_Esp32/build-all.sh
Mitch Bradley f27f29ba99 Removed add-on configurations
The new Spindle Class is a much better solution to
the problem that add-on's were intended to address.
2020-04-22 14:51:48 -10:00

42 lines
923 B
Bash
Executable File

#!/bin/bash
# This shell script uses PlatformIO to compile Grbl_ESP32
# for every machine configuration in the Machines/ directory.
# It is useful for automated testing.
trap "echo; exit 255" SIGINT
# With -v, show all output. Otherwise, show just the result
if [ "$1" = "-v" ]; then
FILTER="cat"
else
FILTER="grep error\|Took"
fi
set -o pipefail
NUM_ERRORS=0
BuildMachine () {
basename=$1
BF="\"-DMACHINE_FILENAME=$basename\""
displayname=$basename
echo "Building machine $displayname"
PLATFORMIO_BUILD_FLAGS=$BF platformio run 2>&1 | $FILTER
local re=$?
# check result
if [ $re -ne 0 ]; then
echo "Failed to build machine $displayname"
echo
NUM_ERRORS=$(( NUM_ERRORS + 1 ))
return $re
fi
echo
}
# Build all the machines
for file in `ls ./Grbl_Esp32/Machines/*`; do
base=`basename $file`
BuildMachine $base ""
done
exit $NUM_ERRORS