meson: Add dist script to vendor cargo dependencies for offline builds

This commit is contained in:
Tom A. Wagner
2021-11-30 09:57:16 +01:00
parent 3c507683b7
commit 110e9ef67f
2 changed files with 18 additions and 0 deletions

12
build-aux/dist-vendor.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
export DIST="$1"
export SOURCE_ROOT="$2"
cd "$SOURCE_ROOT"
mkdir "$DIST"/.cargo
cargo vendor > $DIST/.cargo/config
# Move vendor into dist tarball directory
mv vendor "$DIST"