10 Fetch and archive all dependencies from a Rust archive using 'cargo vendor'.
14 if [ "x$1" = "x" ]; then
21 if [ -d "$(dirname $0)/bin/.cargo" ];then
22 CARGO_HOME
=$
(cd $
(dirname $0)/bin
/.cargo
&& pwd)
23 CARGO
="CARGO_HOME=\"${CARGO_HOME}\" \"${CARGO_HOME}/bin/cargo\""
28 # Extract archive into a tmp dir
29 TMP_DIR
=.tmp-$
(basename $1)
33 tar xf
"$1" -C ${TMP_DIR}
36 # Fetch all dependencies
37 eval ${CARGO} vendor
--locked
39 # Archive all dependencies
40 name
=$
(basename `pwd`)-vendor
41 tar -jcf "../../${name}.tar.bz2" vendor
--transform "s,vendor,${name},"
46 echo "Please upload this package '${name}.tar.bz2' to our VideoLAN FTP,"
48 echo "and write the following checksum into the contrib/src/<project>/cargo-vendor-SHA512SUMS:"
50 sha512sum
${name}.
tar.bz2