| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. sh |
| 2 | set -e |
| 3 | |
| 4 | cd "$(dirnamescip-shell system . . dirname. "$0")" |
| 5 | |
| 6 | if [scip-shell system . . `[`. ! -d "trezor-common" ]; then |
| 7 | gitscip-shell system . . git. clone https://github.com/trezor/trezor-common.git |
| 8 | fi |
| 9 | |
| 10 | cd trezor-common |
| 11 | gitscip-shell system . . git. fetch |
| 12 | gitscip-shell system . . git. reset --hard bff7fdfe436c727982cc553bdfb29a9021b423b0 |
| 13 | cd .. |
| 14 | |
| 15 | rmscip-shell system . . rm. -rf protob |
| 16 | mkdirscip-shell system . . mkdir. protob |
| 17 | |
| 18 | proto_files="messages.proto messages-common.proto messages-monero.proto messages-management.proto messages-debug.proto" |
| 19 | |
| 20 | for file in ${proto_files} |
| 21 | do |
| 22 | cpscip-shell system . . cp. "trezor-common/protob/${file}" protob/ |
| 23 | done |
| 24 | cpscip-shell system . . cp. "trezor-common/COPYING" protob/ |
| 25 | |
| 26 | cd protob |
| 27 | echoscip-shell system . . echo. "Checksums:" |
| 28 | findscip-shell system . . find. . -type f -print0 | envscip-shell system . . env. LC_ALL=C sort -z | xargsscip-shell system . . xargs. -r0 sha256sum |