mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
refactor(lockfile): use better jq parsing
This commit is contained in:
parent
09bd6b5d7e
commit
1ea964a13c
1 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue