diff --git a/php/generate_descriptor_protos.sh b/php/generate_descriptor_protos.sh index 2239312ab5d5..1a600abc6392 100755 --- a/php/generate_descriptor_protos.sh +++ b/php/generate_descriptor_protos.sh @@ -5,10 +5,10 @@ set -e -PROTOC=protoc +PROTOC=$(realpath protoc) if [ ! -f $PROTOC ]; then bazel build -c opt //:protoc - PROTOC=bazel-bin/protoc + PROTOC=$(realpath bazel-bin/protoc) fi if test ! -e src/google/protobuf/stubs/common.h; then @@ -19,16 +19,17 @@ __EOF__ exit 1 fi -$PROTOC --php_out=internal:php/src google/protobuf/descriptor.proto -$PROTOC --php_out=internal_generate_c_wkt:php/src \ - src/google/protobuf/any.proto \ - src/google/protobuf/api.proto \ - src/google/protobuf/duration.proto \ - src/google/protobuf/empty.proto \ - src/google/protobuf/field_mask.proto \ - src/google/protobuf/source_context.proto \ - src/google/protobuf/struct.proto \ - src/google/protobuf/type.proto \ - src/google/protobuf/timestamp.proto \ - src/google/protobuf/wrappers.proto +pushd src +$PROTOC --php_out=internal:../php/src google/protobuf/descriptor.proto +$PROTOC --php_out=internal_generate_c_wkt:../php/src \ + google/protobuf/any.proto \ + google/protobuf/api.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/type.proto \ + google/protobuf/timestamp.proto \ + google/protobuf/wrappers.proto popd