mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-01-10 02:51:25 +01:00
28 lines
494 B
Bash
Executable File
28 lines
494 B
Bash
Executable File
#!/bin/bash
|
|
# -----------------------------------------------------------------------------
|
|
# Generates the gRPC java artifacts from protobuf models.
|
|
# -----------------------------------------------------------------------------
|
|
out=$1
|
|
shift
|
|
proto_paths=$1
|
|
shift
|
|
protoc=$1
|
|
shift
|
|
plugin=$1
|
|
shift
|
|
|
|
#set -x
|
|
|
|
dir=$(dirname $out)
|
|
mkdir -p $dir
|
|
|
|
$protoc \
|
|
--plugin=protoc-gen-grpc-java=$plugin \
|
|
--grpc-java_out=$dir \
|
|
--java_out=$dir \
|
|
$proto_paths \
|
|
$*
|
|
|
|
cd $dir
|
|
jar -cf $out *
|