mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-01-29 03:47:38 +01:00
50bae92bfb
* Implemented gcode parsing. No action yet. * Added iImmediate version of commands. * Analog I/O working - don't merge yet. * Ready for review * Fixing issues and mask variable size
44 lines
986 B
Bash
Executable File
44 lines
986 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"
|
|
FILTER2="cat"
|
|
else
|
|
FILTER="grep -v Compiling"
|
|
FILTER2="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 | $FILTER2
|
|
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/src/Machines/*`; do
|
|
base=`basename $file`
|
|
BuildMachine $base ""
|
|
done
|
|
|
|
exit $NUM_ERRORS
|