summaryrefslogtreecommitdiff
path: root/gen_cbindgen-vendor.sh
blob: af41ce0344f1f7f032009c71d8cbbf1b93dac253 (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
#!/bin/bash
# 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.6.8"

[[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