aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2024-02-26 11:34:09 -0700
committerJack Sangdahl <[email protected]>2024-02-26 11:34:09 -0700
commit23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a (patch)
treee4a0bf25179e5b18a1228f4b3273c19920ea00d0
parent7620b42425c6404692cb4b8b51a0276136a748aa (diff)
downloadzmk_build-23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a.tar.gz
zmk_build-23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a.zip
module support in build script
-rwxr-xr-xbuild.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 21568db..0eca99b 100755
--- a/build.sh
+++ b/build.sh
@@ -12,18 +12,20 @@ set -e
build() {
printf "building ${GREEN}$1${NORMAL} for ${BLUE}$2${NORMAL}...\n"
(cd $ZMK_DIR/app
+ MODULE_CMD=""
+ if [ -n $3 ]; then
+ MODULE_CMD=-DZMK_EXTRA_MODULES="$HOME/git/zmk-build/$3"
+ fi
west build -p always -b $2 -- -DSHIELD=$1 \
- -DZMK_CONFIG="$HOME/git/zmk-build/config"
- # -DZMK_EXTRA_MODULES="$HOME/git/zmk-build/$3"
+ -DZMK_CONFIG=$HOME/git/zmk-build/config $MODULE_CMD
read -p "${BOLD}flash? (y/n) ${NORMAL}" yn
case $yn in
[Yy]*)
printf "${YELLOW}enter bootloader${NORMAL}...\n"
sleep 5
- doas mount /dev/sdb ~/.local/Media
+ udisksctl mount -b /dev/sdb
west flash
- doas umount /dev/sdb
;;
[Nn]*) cp build/zephyr/zmk.uf2 ~/$1.uf2 ;;
* ) printf "${RED}invalid entry${NORMAL}\n" ;;
@@ -41,7 +43,7 @@ case $opt in
build corne_right nice_nano_v2
;;
2)
- build revxlp seeeduino_xiao_ble
+ build revxlp seeeduino_xiao_ble "revxlp"
;;
3)
build splitkb_aurora_sweep_left nice_nano_v2