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 | |
| parent | 09bd6b5d7e54a1e82678249958e64594b0676e3e (diff) | |
refactor(lockfile): use better jq parsing
Diffstat (limited to 'scripts')
| -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 1ba57ff2..8fcf553e 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 } |
