From 5ed97229a6280e4cce4739b5fe8d79f957aabebf Mon Sep 17 00:00:00 2001 From: TheRealZeljko Date: Sun, 14 Jul 2024 14:16:33 +0200 Subject: [PATCH] chore: remove jq dependency --- README.md | 15 +++++++++------ build.sh | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bed49d92..8c8dc311 100644 --- a/README.md +++ b/README.md @@ -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: +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 diff --git a/build.sh b/build.sh index b4884057..667bee00 100755 --- a/build.sh +++ b/build.sh @@ -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"