keyboards/zofle/build.bash
2021-12-06 10:35:56 -06:00

21 lines
771 B
Bash
Executable file

#!/usr/bin/env bash
ZMK_DOCKER_IMAGE="${ZMK_DOCKER_IMAGE:-zmkfirmware/zmk-build-arm:2.5}"
docker run -it --rm \
-v ${PWD}/.cache:/zofle \
-v ${PWD}/config:/zofle/config:ro \
-v ${PWD}/build:/build \
"$ZMK_DOCKER_IMAGE" sh -c 'set -x
set -e
cd /zofle
west init -l config || true # allowed to fail since it will fail if already initialized
west update
west zephyr-export
echo "Building left"
west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=sofle_left -DZMK_CONFIG="/zofle/config"
cp /zofle/build/zephyr/zmk.uf2 /build/sofle_left_nice_nano.uf2
echo "Building right"
west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=sofle_right -DZMK_CONFIG="/zofle/config"
cp /zofle/build/zephyr/zmk.uf2 /build/sofle_right_nice_nano.uf2'