aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/bin/generate_proto_php.sh
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2017-01-11 19:35:17 -0800
committerGravatar Stanley Cheung <stanleycheung@google.com>2017-01-11 19:36:32 -0800
commit122c687d61aac26d228da9bb6ed2a6237be55d93 (patch)
treef104c8d4ddad7f47549709c1856f4de03b8a5afe /src/php/bin/generate_proto_php.sh
parent1b59bfc52bf37fcbb9ab0a5c828856128f4acdf5 (diff)
Fix various PHP bugs
Diffstat (limited to 'src/php/bin/generate_proto_php.sh')
-rwxr-xr-xsrc/php/bin/generate_proto_php.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/php/bin/generate_proto_php.sh b/src/php/bin/generate_proto_php.sh
index c558bc5769..06cd769330 100755
--- a/src/php/bin/generate_proto_php.sh
+++ b/src/php/bin/generate_proto_php.sh
@@ -39,10 +39,12 @@ protoc --proto_path=src/proto/math \
# replace the Empty message with EmptyMessage
# because Empty is a PHP reserved word
-sed -i 's/message Empty/message EmptyMessage/g' \
- src/proto/grpc/testing/empty.proto
-sed -i 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
- src/proto/grpc/testing/test.proto
+sed 's/message Empty/message EmptyMessage/g' \
+ src/proto/grpc/testing/empty.proto > empty.proto
+mv empty.proto ./src/proto/grpc/testing
+sed 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \
+ src/proto/grpc/testing/test.proto > test.proto
+mv test.proto ./src/proto/grpc/testing
protoc --proto_path=. \
--php_out=src/php/tests/interop \
@@ -53,7 +55,10 @@ protoc --proto_path=. \
src/proto/grpc/testing/test.proto
# change it back
-sed -i 's/message EmptyMessage/message Empty/g' \
- src/proto/grpc/testing/empty.proto
-sed -i 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
- src/proto/grpc/testing/test.proto
+sed 's/message EmptyMessage/message Empty/g' \
+ src/proto/grpc/testing/empty.proto > empty.proto
+mv empty.proto ./src/proto/grpc/testing
+sed 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \
+ src/proto/grpc/testing/test.proto > test.proto
+mv test.proto ./src/proto/grpc/testing
+