summaryrefslogtreecommitdiff
path: root/gen_cbindgen-vendor.sh
blob: 8e10eb22497c2ebd82887110e17aadda99ec3d5a (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.24.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