mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -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() {
|
make_ignored() {
|
||||||
if [ -n "$1" ]
|
if [ -n "$1" ]
|
||||||
then
|
then
|
||||||
jq keys < lockfile.json | tail --line=+2 | head --lines=-1 | tr -d "\" ," | while read lang
|
while read -r lang; do
|
||||||
do
|
|
||||||
if [ "$lang" != "$1" ]
|
if [ "$lang" != "$1" ]
|
||||||
then
|
then
|
||||||
printf "$lang,"
|
printf "%s," "$lang"
|
||||||
fi
|
fi
|
||||||
done
|
done < <(jq 'keys|@sh' -c lockfile.json)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue