Sasha Smundak | 7a894a6 | 2020-05-06 21:23:08 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # Generates the golang source file of protos file describing APK set table of |
| 3 | # contents (toc.pb file). |
| 4 | |
| 5 | set -e |
| 6 | function die() { echo "ERROR: $1" >&2; exit 1; } |
| 7 | |
| 8 | readonly error_msg="Maybe you need to run 'lunch aosp_arm-eng && m aprotoc blueprint_tools'?" |
| 9 | |
| 10 | hash aprotoc &>/dev/null || die "could not find aprotoc. ${error_msg}" |
| 11 | # TODO(asmundak): maybe have the paths relative to repo top? |
| 12 | (cd "${0%/*}" && aprotoc --go_out=paths=source_relative:. commands.proto config.proto targeting.proto ) || die "build failed. ${error_msg}" |