rust-libp2p/secio/regen_structs_proto.sh
Jef 5c4aefe457 Remove libp2p- prefix (#152)
* Remove `libp2p-` prefix

* More sed-fu
2018-03-20 14:44:46 +01:00

15 lines
461 B
Bash
Executable File

#!/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; \
cargo install protobuf; \
protoc --rust_out . structs.proto; \
protoc --rust_out . keys.proto"
mv -f structs.rs ./src/structs_proto.rs
mv -f keys.rs ./src/keys_proto.rs