third-party/libhv-v1.3.3/examples/protorpc/proto/protoc.sh
raw| 1 | #!/bin/bash |
| 2 | |
| 3 | cd `dirname $0` |
| 4 | |
| 5 | PROTOC=`which protoc` |
| 6 | if [ $? -ne 0 ]; then |
| 7 | echo "Not found command protoc!" |
| 8 | echo "Please install libprotobuf first!" |
| 9 | exit 1 |
| 10 | fi |
| 11 | |
| 12 | CPP_OUT_DIR=../generated |
| 13 | if [ ! -d "${CPP_OUT_DIR}" ]; then |
| 14 | mkdir -p ${CPP_OUT_DIR} |
| 15 | fi |
| 16 | |
| 17 | set -x |
| 18 | ${PROTOC} --cpp_out=${CPP_OUT_DIR} *.proto |