mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 23:32:39 +00:00
show-utils.sh: fix jq query to get coreutils deps
In jq query, the correct regex to select .id is ".*coreutils[ |@]\\d+\\.\\d+\\.\\d+" - with cargo v1.76, id = "coreutils 0.0.26 (path+file://<coreutils local directory>)" - with cargo v1.77, id = "path+file://<coreutils local directory>#coreutils@0.0.26" Fix uutils/coreutils#6242 Signed-off-by: Laurent Cheylus <foxy@free.fr>
This commit is contained in:
parent
99d234af87
commit
3b96ff1d10
1 changed files with 4 additions and 1 deletions
|
@ -33,5 +33,8 @@ 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 "WARN: missing \`jq\` (install with \`sudo apt install jq\`); falling back to default (only fully cross-platform) utility list" 1>&2
|
||||||
echo "$default_utils"
|
echo "$default_utils"
|
||||||
else
|
else
|
||||||
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(" ")'
|
# 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, id = "path+file://<coreutils local 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(" ")'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue