rust-libp2p/identify/regen_structs_proto.sh

13 lines
401 B
Bash
Raw Normal View History

#!/bin/sh
# This script regenerates the `src/structs_proto.rs` and `src/keys_proto.rs` files from
# `structs.proto` and `keys.proto`.
sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \
apt-get update; \
apt-get install -y protobuf-compiler; \
2018-06-21 16:53:23 +02:00
cargo install --version 1 protobuf; \
protoc --rust_out . structs.proto"
mv -f structs.rs ./src/structs_proto.rs