From 03327ba224e7ade88e7d7d6a585c676fcbafd68d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 7 Jun 2024 19:05:50 +0200 Subject: [PATCH] support/download: accept manifest path as a post-process option Now we have the post-process options, we can use them to pass the manifest path instead of passing it through an environment variable. For now, we support both. The environment variable approach will be removed again later. Signed-off-by: Yann E. MORIN Signed-off-by: Arnout Vandecappelle --- support/download/cargo-post-process | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/support/download/cargo-post-process b/support/download/cargo-post-process index b94b160315..a9fbced466 100755 --- a/support/download/cargo-post-process +++ b/support/download/cargo-post-process @@ -5,10 +5,12 @@ set -e # shellcheck source=helpers source-path=SCRIPTDIR . "${0%/*}/helpers" -while getopts "n:o:" OPT; do +manifest="${BR_CARGO_MANIFEST_PATH-Cargo.toml}" +while getopts "n:o:m:" OPT; do case "${OPT}" in o) output="${OPTARG}";; n) base_name="${OPTARG}";; + m) manifest="${OPTARG}";; :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; \?) error "unknown option '%s'\n" "${OPTARG}";; esac @@ -29,7 +31,7 @@ mkdir -p .cargo/ mkdir -p "${CARGO_HOME}" flock "${CARGO_HOME}"/.br-lock \ cargo vendor \ - --manifest-path "${BR_CARGO_MANIFEST_PATH-Cargo.toml}" \ + --manifest-path "${manifest}" \ --locked VENDOR \ > .cargo/config