File: gensrc.sh

package info (click to toggle)
libgoby-java 3.3.1%2Bdfsg2-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 58,108 kB
  • sloc: java: 78,105; cpp: 5,011; xml: 3,170; python: 2,108; sh: 1,575; ansic: 277; makefile: 114
file content (25 lines) | stat: -rwxr-xr-x 662 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
25
#!/bin/bash

#
# Generate Goby source code from protocol buffer definition files.
# Assumes that the ".proto" files reside alongside the script.
#

# Absolute path to this script.
SCRIPT="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"

# Absolute path this script is in.
SCRIPT_DIR=`dirname $SCRIPT` 

# Destination directory for C++ code
CPP_DEST_DIR=../cpp/src/goby

# Destination directory for Java code
JAVA_DEST_DIR=../src

# Destination directory for Python code
PYTHON_DEST_DIR=../python/goby

pushd ${SCRIPT_DIR} > /dev/null
protoc --cpp_out="${CPP_DEST_DIR}" --java_out="${JAVA_DEST_DIR}" --python_out="${PYTHON_DEST_DIR}" *.proto
popd > /dev/null