#!/bin/bash#function:# script used to generate caffepb.py from caffe.proto using protoc#PROTOC=`which protoc`if[[-z$PROTOC]];thenecho"not found protoc, you should first install it following this[https://github.com/google/protobuf/releases]"exit 1fiWORK_ROOT=$(dirname`readlink-f"$BASH_SOURCE[0]"`)PY_NAME="$WORK_ROOT/caffe_pb2.py"$PROTOC--proto_path=$WORK_ROOT--python_out=$WORK_ROOT$WORK_ROOT/caffe.protoret=$?if[-e"$PY_NAME"];thenecho"succeed to generate [$PY_NAME]"exit 0elseecho"failed to generate [$PY_NAME]"fiexit$ret