Skip to content

Commit

Permalink
fix the show-utils script to list all the tools
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Jan 18, 2025
1 parent 79f4b89 commit ef081fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions util/show-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ 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
# Find 'coreutils' id with regex
# with cargo v1.76.0, id = "coreutils 0.0.26 (path+file://<coreutils local directory>)"
# with cargo >= v1.77.0
# - if local path != '<...>/coreutils' id = "path+file://<coreutils local directory>#[email protected]"
# - if local path == '<...>/coreutils' id = "path+file://<parent directory>/coreutils#0.0.26"
cargo metadata "$@" --format-version 1 | jq -r '[.resolve.nodes[] | select(.id|match(".*coreutils[ |@|#]\\d+\\.\\d+\\.\\d+")) | .deps[] | select(.pkg|match("uu_")) | .name | sub("^uu_"; "")] | sort | join(" ")'
cargo metadata "$@" --format-version 1 | jq -r '[.packages[]
| select(.default_run == "coreutils")
| .dependencies[]
| select(.name | startswith("uu_"))
| .name | sub("^uu_"; "")]
| sort | join(" ")'
fi

0 comments on commit ef081fe

Please sign in to comment.