diff options
| author | kylo252 <59826753+kylo252@users.noreply.github.com> | 2022-01-25 12:52:51 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-01-25 18:38:34 +0100 |
| commit | 1ea964a13c6bb24828188bdbccf133e5bc370269 (patch) | |
| tree | c8b9e5ecdfb2dde3d07af7ffd234d77ed8e88334 /scripts/update-lockfile.sh | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar.gz nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar.bz2 nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar.lz nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar.xz nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.tar.zst nvim-treesitter-1ea964a13c6bb24828188bdbccf133e5bc370269.zip | |
refactor(lockfile): use better jq parsing
Diffstat (limited to 'scripts/update-lockfile.sh')
| -rwxr-xr-x | scripts/update-lockfile.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/update-lockfile.sh b/scripts/update-lockfile.sh index 1ba57ff21..8fcf553ed 100755 --- a/scripts/update-lockfile.sh +++ b/scripts/update-lockfile.sh @@ -1,15 +1,14 @@ -#!/bin/sh +#!/usr/bin/env bash make_ignored() { if [ -n "$1" ] then - jq keys < lockfile.json | tail --line=+2 | head --lines=-1 | tr -d "\" ," | while read lang - do + while read -r lang; do if [ "$lang" != "$1" ] then - printf "$lang," + printf "%s," "$lang" fi - done + done < <(jq 'keys|@sh' -c lockfile.json) fi } |
