From c4f7a72e50694b9a8b2d0ce4be7a14251c465d88 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 13 Jul 2024 16:02:22 +0300 Subject: [PATCH] macos does not have `sed --in-place` argument (#12330) --- scripts/generate_proto_stubs.sh | 2 +- scripts/sync_s2clientprotocol_protobuf_stubs.sh | 2 +- scripts/sync_tensorflow_protobuf_stubs.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/generate_proto_stubs.sh b/scripts/generate_proto_stubs.sh index f1a0c01b5..e6f69ae9e 100755 --- a/scripts/generate_proto_stubs.sh +++ b/scripts/generate_proto_stubs.sh @@ -63,7 +63,7 @@ rm -rf "$TMP_DIR" # Must be in a git repository to run pre-commit cd "$REPO_ROOT" -sed --in-place="" \ +sed -i "" \ "s/extra_description = .*$/extra_description = \"\ Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \ and $PROTOC_VERSION \ diff --git a/scripts/sync_s2clientprotocol_protobuf_stubs.sh b/scripts/sync_s2clientprotocol_protobuf_stubs.sh index bc0658607..6926c8a0c 100644 --- a/scripts/sync_s2clientprotocol_protobuf_stubs.sh +++ b/scripts/sync_s2clientprotocol_protobuf_stubs.sh @@ -50,7 +50,7 @@ rm -rf "$TMP_DIR" # Must be in a git repository to run pre-commit cd "$REPO_ROOT" -sed --in-place="" \ +sed -i "" \ "s/extra_description = .*$/extra_description = \"\ Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \ and $PROTOC_VERSION \ diff --git a/scripts/sync_tensorflow_protobuf_stubs.sh b/scripts/sync_tensorflow_protobuf_stubs.sh index 19f91951c..a46e331a2 100755 --- a/scripts/sync_tensorflow_protobuf_stubs.sh +++ b/scripts/sync_tensorflow_protobuf_stubs.sh @@ -63,9 +63,9 @@ cd "$REPO_ROOT" # Move third-party and fix imports mv stubs/tensorflow/tsl/ stubs/tensorflow/tensorflow/ -find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed --in-place="" -r "s/(\[|\s)tsl\./\1tensorflow\.tsl\./" +find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed -i "" -r "s/(\[|\s)tsl\./\1tensorflow\.tsl\./" mv stubs/tensorflow/xla/ stubs/tensorflow/tensorflow/compiler/ -find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed --in-place="" -r "s/(\[|\s)xla\./\1tensorflow\.compiler\.xla\./" +find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed -i "" -r "s/(\[|\s)xla\./\1tensorflow\.compiler\.xla\./" # These protos exist in a folder with protos used in python, # but are not included in the python wheel. @@ -89,7 +89,7 @@ rm -r \ stubs/tensorflow/tensorflow/core/protobuf/worker_service_pb2.pyi \ stubs/tensorflow/tensorflow/core/util/example_proto_fast_parsing_test_pb2.pyi \ -sed --in-place="" \ +sed -i "" \ "s/extra_description = .*$/extra_description = \"\ Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \ and $PROTOC_VERSION \