mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-30 01:58:11 +00:00
17 lines
494 B
Bash
Executable File
17 lines
494 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Generates src/protos/
|
|
# Requires the `protoc-gen-rust` binary (`cargo install protoc-gen-rust`).
|
|
# Overwrites src/protos/mod.rs, but the change should not be committed, and
|
|
# instead should be handled manually.
|
|
|
|
crate_root="$(dirname "$(dirname "$(realpath "$0")")")"
|
|
main_root="$(dirname $(dirname "$crate_root"))"
|
|
out_dir="$crate_root/src/protos"
|
|
proto_dir="$main_root/common/protob"
|
|
|
|
protoc \
|
|
--proto_path "$proto_dir" \
|
|
--rust_out "$out_dir" \
|
|
"$proto_dir"/*.proto
|