1*1b3f573fSAndroid Build Coastguard Worker#!/usr/bin/env bash 2*1b3f573fSAndroid Build Coastguard Worker 3*1b3f573fSAndroid Build Coastguard Worker# Run this script to regenerate descriptor protos after the protocol compiler 4*1b3f573fSAndroid Build Coastguard Worker# changes. 5*1b3f573fSAndroid Build Coastguard Worker 6*1b3f573fSAndroid Build Coastguard Workerset -e 7*1b3f573fSAndroid Build Coastguard Worker 8*1b3f573fSAndroid Build Coastguard Workerif test ! -e src/google/protobuf/stubs/common.h; then 9*1b3f573fSAndroid Build Coastguard Worker cat >&2 << __EOF__ 10*1b3f573fSAndroid Build Coastguard WorkerCould not find source code. Make sure you are running this script from the 11*1b3f573fSAndroid Build Coastguard Workerroot of the distribution tree. 12*1b3f573fSAndroid Build Coastguard Worker__EOF__ 13*1b3f573fSAndroid Build Coastguard Worker exit 1 14*1b3f573fSAndroid Build Coastguard Workerfi 15*1b3f573fSAndroid Build Coastguard Worker 16*1b3f573fSAndroid Build Coastguard Workerpushd src 17*1b3f573fSAndroid Build Coastguard Worker./protoc --php_out=internal:../php/src google/protobuf/descriptor.proto 18*1b3f573fSAndroid Build Coastguard Worker./protoc --php_out=internal_generate_c_wkt:../php/src \ 19*1b3f573fSAndroid Build Coastguard Worker google/protobuf/any.proto \ 20*1b3f573fSAndroid Build Coastguard Worker google/protobuf/api.proto \ 21*1b3f573fSAndroid Build Coastguard Worker google/protobuf/duration.proto \ 22*1b3f573fSAndroid Build Coastguard Worker google/protobuf/empty.proto \ 23*1b3f573fSAndroid Build Coastguard Worker google/protobuf/field_mask.proto \ 24*1b3f573fSAndroid Build Coastguard Worker google/protobuf/source_context.proto \ 25*1b3f573fSAndroid Build Coastguard Worker google/protobuf/struct.proto \ 26*1b3f573fSAndroid Build Coastguard Worker google/protobuf/type.proto \ 27*1b3f573fSAndroid Build Coastguard Worker google/protobuf/timestamp.proto \ 28*1b3f573fSAndroid Build Coastguard Worker google/protobuf/wrappers.proto 29*1b3f573fSAndroid Build Coastguard Workerpopd 30