blob: 4521df7bda44600f1e33de18f4eca360d84f936d [file] [log] [blame]
Patrice Arrudaadfc1122020-04-03 08:40:19 -07001#!/bin/bash
2
3# Generates the golang source file of upload.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
15if ! aprotoc --go_out=paths=source_relative:. upload.proto; then
16 die "build failed. ${error_msg}"
17fi