xref: /aosp_15_r20/external/protobuf/php/generate_descriptor_protos.sh (revision 1b3f573f81763fcece89efc2b6a5209149e44ab8)
1#!/usr/bin/env bash
2
3# Run this script to regenerate descriptor protos after the protocol compiler
4# changes.
5
6set -e
7
8if test ! -e src/google/protobuf/stubs/common.h; then
9  cat >&2 << __EOF__
10Could not find source code.  Make sure you are running this script from the
11root of the distribution tree.
12__EOF__
13  exit 1
14fi
15
16pushd src
17./protoc --php_out=internal:../php/src google/protobuf/descriptor.proto
18./protoc --php_out=internal_generate_c_wkt:../php/src \
19  google/protobuf/any.proto \
20  google/protobuf/api.proto \
21  google/protobuf/duration.proto \
22  google/protobuf/empty.proto \
23  google/protobuf/field_mask.proto \
24  google/protobuf/source_context.proto \
25  google/protobuf/struct.proto \
26  google/protobuf/type.proto \
27  google/protobuf/timestamp.proto \
28  google/protobuf/wrappers.proto
29popd
30