Skip to content

Commit

Permalink
show-utils.sh: fix jq query
Browse files Browse the repository at this point in the history
  • Loading branch information
tertsdiepraam committed Mar 24, 2024
1 parent 82550b4 commit ddd6a0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/show-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ cd "${project_main_dir}" &&
echo "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
echo "$default_utils"
else
cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")"
# cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")"
cargo metadata "$@" --format-version 1 | jq -r "[.resolve.nodes[] | select(.id|match(\".*coreutils#\\\d+\\\.\\\d+\\\.\\\d+\")) | .deps[] | select(.pkg|match(\"uu_\")) | .name] | sort | join(\" \")"
fi

0 comments on commit ddd6a0c

Please sign in to comment.