mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-08 23:51:08 -09:00
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 <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
f38e706a80
commit
03327ba224
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user