diff options
Diffstat (limited to 'source/d/rust-bindgen/fetch-sources.sh')
-rwxr-xr-x | source/d/rust-bindgen/fetch-sources.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/d/rust-bindgen/fetch-sources.sh b/source/d/rust-bindgen/fetch-sources.sh new file mode 100755 index 000000000..3a2ad0074 --- /dev/null +++ b/source/d/rust-bindgen/fetch-sources.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +#VERSION=$1 +VERSION=0.63.0 + +rm -rf rust-bindgen-*.tar.?z cargo-rust-bindgen* + +echo "Downloading rust-bindgen-$VERSION..." + +wget --content-disposition "https://github.com/rust-lang/rust-bindgen/archive/refs/tags/v$VERSION.tar.gz" + +tar xf rust-bindgen-$VERSION.tar.gz + +tar cf rust-bindgen-$VERSION.tar rust-bindgen-$VERSION + +cd rust-bindgen-$VERSION + + if ! [ -f /usr/bin/cargo-vendor-filterer ]; then + echo "WARNING: Creating unfiltered vendor libs tarball!" + cargo vendor + else + cargo vendor-filterer --platform="x86_64-unknown-linux-gnu" --platform="i686-unknown-linux-gnu" + fi + + mv vendor ../cargo-rust-bindgen-$VERSION +cd .. + +tar cf cargo-rust-bindgen-$VERSION.tar cargo-rust-bindgen-$VERSION + +plzip -9 cargo-rust-bindgen-$VERSION.tar +plzip -9 rust-bindgen-$VERSION.tar + +rm -rf rust-bindgen-$VERSION +rm -rf cargo-rust-bindgen-$VERSION +rm -f rust-bindgen-$VERSION.tar.gz |