Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove jq dependency #2

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ This is my personal ZMK config for the [temper](https://github.com/raeedcho/temp

## How to build locally

Additional requirements: `yq`, `jq`
1. Setup ZMK for local development first. Follow therfore precisely the documentation: <https://zmk.dev/docs/development/setup/native>
2. Additional requirements: [`yq`](https://mikefarah.gitbook.io/yq)
3. Change the paths in the environment variables in the `build.sh` file to match your paths.
4. Run the script

Change the paths in the environment variables in the `.build.sh`, then run it.
```shell
./build.sh
```

```shell
./build.sh
```
This will create a directory called `output` and in there are all the `.uf2` files

This will create a directory called `output` and in there are all the `.uf2` files
5. Flash your microcontrollers with the resulting `.uf2` files

## Extra notes on the dongle part

Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mkdir -p "$OUTPUT_DIRECTORY"

# format to json lines then read ech json object per loop iterationn
yq -o=json -I=0 '.include[]' "$ZMK_CONFIG_ROOT_PATH/build.yaml" | while read -r line; do
board=$(echo "$line" | jq -r '.board')
shield=$(echo "$line" | jq -r '.shield')
board=$(echo "$line" | yq -p=json '.board')
shield=$(echo "$line" | yq -p=json '.shield')

west build -d "build/$shield-$board" -b "$board" --pristine -- -DZMK_CONFIG="$ZMK_CONFIG_ROOT_PATH/config" -DSHIELD="$shield"
cp "build/$shield-$board/zephyr/zmk.uf2" "$OUTPUT_DIRECTORY/$shield-$board.uf2"
Expand Down