File: genprotos.sh

package info (click to toggle)
android-platform-frameworks-base 1%3A10.0.0%2Br36-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 321,788 kB
  • sloc: java: 962,234; cpp: 274,314; xml: 242,770; python: 5,060; sh: 1,432; ansic: 494; makefile: 47; sed: 19
file content (24 lines) | stat: -rwxr-xr-x 737 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

# TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
# end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
# the way sbox rewrites the command. See b/70221552.

set -e

location_aprotoc=$1
location_protoc=$2
location_soong_zip=$3
genDir=$4
depfile=$5
in=$6
out=$7

mkdir -p ${genDir}/${in} && \
  ${location_aprotoc} --plugin=${location_protoc} \
                      --dependency_out=${depfile} \
                      --javastream_out=${genDir}/${in} \
                      -Iexternal/protobuf/src \
                      -I . \
                      ${in} && \
  ${location_soong_zip} -jar -o ${out} -C ${genDir}/${in} -D ${genDir}/${in}