blob: 572785d62861ae42b2a6c8a4ed1399e683806a90 [file] [log] [blame]
Patrice Arruda7d401482020-03-10 14:04:30 -07001#!/bin/bash
2
3# Generates the golang source file of build_completion.proto file.
4
5set -e
6
7function die() { echo "ERROR: $1" >&2; exit 1; }
8
9readonly error_msg="Maybe you need to run 'lunch aosp_arm-eng && m aprotoc blueprint_tools'?"
10
11if ! hash aprotoc &>/dev/null; then
12 die "could not find aprotoc. ${error_msg}"
13fi
14
Patrice Arruda74b43992020-03-11 08:21:05 -070015if ! aprotoc --go_out=paths=source_relative:. build_progress.proto; then
Patrice Arruda7d401482020-03-10 14:04:30 -070016 die "build failed. ${error_msg}"
17fi