blob: 462b2fad4f817f085ad1fd387b138e5d30c5bc31 [file] [log] [blame]
Jeff Vander Stoep761577d2020-10-14 15:21:00 +02001#!/bin/bash
2
3# NOTE:
4# This script is only used when you want to generate bindings yourself.
5# The generated bindings will overwrite grpc-sys/bindings/*
6
7if [ "$ARCH" == "" ]; then
8 ARCH=`uname -p`
9fi
10export UPDATE_BIND=1
11cargo build -p grpcio-sys --target ${ARCH}-unknown-linux-gnu
12rustfmt grpc-sys/bindings/*
13if [ "$(uname -s)" == "Linux" ]; then
14 sed -i '/pub type .*= ::std::os::raw::.*/d' grpc-sys/bindings/*
15fi