diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/update-lockfile.sh | 16 | ||||
| -rwxr-xr-x | scripts/write-lockfile.lua | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/scripts/update-lockfile.sh b/scripts/update-lockfile.sh index 8fcf553ed..22460d14b 100755 --- a/scripts/update-lockfile.sh +++ b/scripts/update-lockfile.sh @@ -1,20 +1,18 @@ #!/usr/bin/env bash make_ignored() { - if [ -n "$1" ] - then + if [[ -n $1 ]]; then while read -r lang; do - if [ "$lang" != "$1" ] - then - printf "%s," "$lang" + if [[ $lang != "$1" ]]; then + printf '%s,' "$lang" fi - done < <(jq 'keys|@sh' -c lockfile.json) + done < <(jq -r 'keys[]' lockfile.json) fi } -TO_IGNORE=$(make_ignored $1) +SKIP_LOCKFILE_UPDATE_FOR_LANGS="$(make_ignored "$1")" \ + nvim --headless -c 'luafile ./scripts/write-lockfile.lua' +q -SKIP_LOCKFILE_UPDATE_FOR_LANGS="$TO_IGNORE" nvim --headless -c "luafile ./scripts/write-lockfile.lua" -c "q" # Pretty print cp lockfile.json /tmp/lockfile.json -cat /tmp/lockfile.json | jq --sort-keys > lockfile.json +jq --sort-keys > lockfile.json < /tmp/lockfile.json diff --git a/scripts/write-lockfile.lua b/scripts/write-lockfile.lua index c1d5d6d8d..7a7606c51 100755 --- a/scripts/write-lockfile.lua +++ b/scripts/write-lockfile.lua @@ -10,6 +10,5 @@ else skip_langs = vim.fn.split(skip_langs, ",") end -print("Skipping languages: " .. vim.inspect(skip_langs)) require("nvim-treesitter.install").write_lockfile("verbose", skip_langs) vim.cmd "q" |
