Skip to content

Commit

Permalink
add local build script
Browse files Browse the repository at this point in the history
  • Loading branch information
erenatas committed May 5, 2024
1 parent c784d91 commit 8bbecdf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
33 changes: 33 additions & 0 deletions build-locally.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

set -euxo pipefail

# Requirements:
# 1. https://zmk.dev/docs/development/setup
# 2. checkout zmk repo to feat/pointers-move-scroll on petejohansson's repo

build_and_copy () {
local side=$1
west build \
-b nice_nano_v2 -- \
-DSHIELD=charybdis_$side \
-DZMK_CONFIG="/home/erenatas/GitRepos/zmk-config-charybdis-mini-wireless/config"

cp "./build/zephyr/zmk.uf2" "$CURRENT_DIR/build/charybdis_$side.uf2"
}

CURRENT_DIR="$(pwd)"
CONFIG_DIR="$(pwd)/config"

DEFAULTZMKAPPDIR="$HOME/GitRepos/zmk/app"
ZMK_APP_DIR="${1:-$DEFAULTZMKAPPDIR}"

mkdir -p $CURRENT_DIR/build

pushd $ZMK_APP_DIR

build_and_copy left
build_and_copy right

popd

0 comments on commit 8bbecdf

Please sign in to comment.