zmk: qol build script improvement

This commit is contained in:
phiwan-dev 2025-08-30 05:14:33 +02:00
parent fd3a8a41f4
commit 8f1742f9d6
2 changed files with 9 additions and 4 deletions

View file

@ -2,11 +2,11 @@
rm -rf left.uf2 right.uf2
if [ "$1" == "--cached" ]; then
devcontainer exec --workspace-folder ./zmk /bin/bash phiboard-build-cached.sh
if [ "$1" == "--cached" ] || [ "$1" == "-c" ]; then
devcontainer exec --workspace-folder ./zmk /bin/bash phiboard-build-cached.sh
else
devcontainer up --workspace-folder ./zmk
devcontainer exec --workspace-folder ./zmk /bin/bash phiboard-build.sh
devcontainer up --workspace-folder ./zmk
devcontainer exec --workspace-folder ./zmk /bin/bash phiboard-build.sh
fi
cp zmk/app/build/left/zephyr/zmk.uf2 left.uf2

View file

@ -27,8 +27,11 @@ echo doing a clean build...
(
rm -rf build/
cd app/
echo == building left half ==
west build -p -d build/left -b seeeduino_xiao_ble -- -DSHIELD=phiboard_left -DZMK_CONFIG="/workspaces/zmk-config"
echo == building right half ==
west build -p -d build/right -b seeeduino_xiao_ble -- -DSHIELD=phiboard_right -DZMK_CONFIG="/workspaces/zmk-config"
echo
echo == clean build completed ==
echo future builds can be done with the --cached option
)
@ -40,7 +43,9 @@ echo "
echo doing a successive build...
(
cd app/
echo == building left half ==
west build -d build/left
echo == building right half ==
west build -d build/right
)
" > zmk/phiboard-build-cached.sh