mockband/.gitea/build.sh

42 lines
806 B
Bash
Executable File

#! /bin/sh
set -e
log () {
echo "=== $*"
}
# Make sure we're in the project directory
cd $(dirname $0)/..
mkdir -p out/
while read vid pid variant; do
log
log Building $vid $pid $product
log
rm -rf build/
mkdir -p build/cache/
arduino-builder \
-build-path $(pwd)/build/ \
-build-cache $(pwd)/build/cache/ \
-fqbn arduino:avr:leonardo \
-hardware /usr/share/arduino/hardware \
-tools /usr/share/arduino/tools \
-prefs='build.vid=$vid' \
-prefs='build.pid=$pid' \
-prefs='build.usb_product="Mockband $variant"' \
-prefs='build.extra_flags="{build.usb_flags} -DCDC_DISABLED"' \
-compile MockBand.ino
mv build/MockBand.ino.hex out/MockBand.$variant.hex
find out build/cache
done << EOD
0x1bad 0x0004 guitar
0x1bad 0x3110 drums
EOD
ls -l out/