summaryrefslogtreecommitdiff
path: root/gen_cbindgen-vendor.sh
blob: 01ecc5d4b6e11d5f48cb2fb559e94ff985f8f0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -x

# Dummy Cargo.toml file with cbindgen dependency
cat > Cargo.toml <<EOL
[package]
name = "dummy"
version = "0.0.1"
description = """
This is a dummy package which contains dependency on cbindgen
to be used with 'cargo vendor' commmand.
"""

[dependencies]
cbindgen = "0.9.0"

[[bin]]
name = "dummy"
path = "dummy.rs"
doc = false
EOL

cargo install cargo-vendor
cargo vendor

cd vendor
tar -cJf ../cbindgen-vendor.tar.xz *
cd ..

rm -f Cargo.toml
rm -rf vendor

bgstack15