diff options
author | Jack Sangdahl <[email protected]> | 2024-02-26 11:34:09 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2024-02-26 11:34:09 -0700 |
commit | 23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a (patch) | |
tree | e4a0bf25179e5b18a1228f4b3273c19920ea00d0 | |
parent | 7620b42425c6404692cb4b8b51a0276136a748aa (diff) | |
download | zmk_build-23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a.tar.gz zmk_build-23795a8ad7a8f57d8d20690aff4a8e7ed4799c2a.zip |
module support in build script
-rwxr-xr-x | build.sh | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |