mockband/.gitea/build.sh

42 lines
798 B
Bash
Raw Normal View History

2024-01-04 21:36:17 -07:00
#! /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/ \
2024-01-04 22:16:36 -07:00
-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" \
2024-01-04 21:36:17 -07:00
-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/