| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | #!/bin/bash# Run this script to regenerate descriptor.pbobjc.{h,m} after the protocol# compiler changes.# HINT:  Flags passed to generate_descriptor_proto.sh will be passed directly#   to make when building protoc.  This is particularly useful for passing#   -j4 to run 4 jobs simultaneously.set -eureadonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")")readonly ProtoRootDir="${ScriptDir}/.."readonly ProtoC="${ProtoRootDir}/src/protoc"pushd "${ProtoRootDir}" > /dev/nullif test ! -e src/google/protobuf/stubs/common.h; then  cat >&2 << __EOF__Could not find source code.  Make sure you are running this script from theroot of the distribution tree.__EOF__  exit 1fiif test ! -e src/Makefile; then  cat >&2 << __EOF__Could not find src/Makefile.  You must run ./configure (and perhaps./autogen.sh) first.__EOF__  exit 1fi# Make sure the compiler is current.cd srcmake $@ protocdeclare -a RUNTIME_PROTO_FILES=(\  google/protobuf/any.proto \  google/protobuf/api.proto \  google/protobuf/descriptor.proto \  google/protobuf/duration.proto \  google/protobuf/empty.proto \  google/protobuf/field_mask.proto \  google/protobuf/source_context.proto \  google/protobuf/struct.proto \  google/protobuf/timestamp.proto \  google/protobuf/type.proto \  google/protobuf/wrappers.proto)./protoc --objc_out="${ProtoRootDir}/objectivec" ${RUNTIME_PROTO_FILES[@]}popd > /dev/null
 |