2020-10-14 22:23:49 +00:00
|
|
|
#!/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]
|
2024-10-02 09:09:33 +00:00
|
|
|
cbindgen = "0.26.0"
|
2020-10-14 22:23:49 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "dummy"
|
|
|
|
path = "dummy.rs"
|
|
|
|
doc = false
|
|
|
|
EOL
|
|
|
|
|
2022-09-20 18:36:19 +00:00
|
|
|
cargo install cargo-vendor
|
2020-10-14 22:23:49 +00:00
|
|
|
cargo vendor
|
|
|
|
|
|
|
|
cd vendor
|
|
|
|
tar -cJf ../cbindgen-vendor.tar.xz *
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
rm -f Cargo.toml
|
|
|
|
rm -rf vendor
|
|
|
|
|