Skip to content

Commit

Permalink
chore: remove jq dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
zeljkobekcic authored Jul 14, 2024
1 parent e7c7cad commit 5ed9722
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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

0 comments on commit 5ed9722

Please sign in to comment.