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 (12 lines) | stat: -rwxr-xr-x 541 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# Generates the golang source file of protos file describing APK set table of
# contents (toc.pb 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'?"

hash aprotoc &>/dev/null || die "could not find aprotoc. ${error_msg}"
# TODO(asmundak): maybe have the paths relative to repo top?
(cd "${0%/*}" && aprotoc --go_out=paths=source_relative:. commands.proto config.proto targeting.proto ) || die "build failed. ${error_msg}"