File: regen.sh

package info (click to toggle)
golang-android-soong 0.0~git20201014.17e97d9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,680 kB
  • sloc: python: 3,000; sh: 1,780; cpp: 66; makefile: 5
file content (17 lines) | stat: -rwxr-xr-x 412 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Generates the golang source file of upload.proto file.

set -e

function die() { echo "ERROR: $1" >&2; exit 1; }

readonly error_msg="Maybe you need to run 'lunch aosp_arm-eng && m aprotoc blueprint_tools'?"

if ! hash aprotoc &>/dev/null; then
  die "could not find aprotoc. ${error_msg}"
fi

if ! aprotoc --go_out=paths=source_relative:. upload.proto; then
  die "build failed. ${error_msg}"
fi