2018-10-18 14:27:09 +00:00
|
|
|
#!/bin/bash
|
2019-02-18 12:20:03 +00:00
|
|
|
set -x
|
|
|
|
|
2018-10-18 14:27:09 +00:00
|
|
|
# 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]
|
2019-01-29 09:19:13 +00:00
|
|
|
cbindgen = "0.6.8"
|
2018-10-18 14:27:09 +00:00
|
|
|
|
|
|
|
[[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
|
|
|
|
|