From f3c83bfe3da285be7263920164425f110379b73c Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 16 Jan 2018 10:55:00 -0800 Subject: [PATCH] Fix sed error in podspecs on sed 4.4 --- gRPC-Core.podspec | 2 +- src/objective-c/BoringSSL.podspec | 14 +++++++------- templates/gRPC-Core.podspec.template | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 358fad3d983..60943f5b4d6 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1085,6 +1085,6 @@ Pod::Spec.new do |s| # TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path? s.prepare_command = <<-END_OF_COMMAND - find src/core/ -type f -exec sed -E -i '.back' 's;#include "third_party/nanopb/(.*)";#include ;g' {} \\\; + find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include ;g' {} \\\; END_OF_COMMAND end diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index c61afc1a8f7..6e406b0dc9b 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -136,12 +136,12 @@ Pod::Spec.new do |s| # Replace "const BIGNUM *I" in rsa.h with a lowercase i, as the former fails when including # OpenSSL in a Swift bridging header (complex.h defines "I", and it's as if the compiler # included it in every bridged header). - sed -E -i '.back' 's/\\*I,/*i,/g' include/openssl/rsa.h + sed -E -i'.back' 's/\\*I,/*i,/g' include/openssl/rsa.h # Replace `#include "../crypto/internal.h"` in e_tls.c with `#include "../internal.h"`. The # former assumes crypto/ is in the headers search path, which is hard to enforce when using # dynamic frameworks. The latters always works, being relative to the current file. - sed -E -i '.back' 's/crypto\\///g' crypto/cipher/e_tls.c + sed -E -i'.back' 's/crypto\\///g' crypto/cipher/e_tls.c # Add a module map and an umbrella header cat > include/openssl/umbrella.h </d' include/openssl/bn.h - sed -E -i '.back' 's/PRIu32/"u"/g' include/openssl/bn.h - sed -E -i '.back' 's/PRIx32/"x"/g' include/openssl/bn.h - sed -E -i '.back' 's/PRIu64/"llu"/g' include/openssl/bn.h - sed -E -i '.back' 's/PRIx64/"llx"/g' include/openssl/bn.h + sed -E -i'.back' '//d' include/openssl/bn.h + sed -E -i'.back' 's/PRIu32/"u"/g' include/openssl/bn.h + sed -E -i'.back' 's/PRIx32/"x"/g' include/openssl/bn.h + sed -E -i'.back' 's/PRIu64/"llu"/g' include/openssl/bn.h + sed -E -i'.back' 's/PRIx64/"llx"/g' include/openssl/bn.h # This is a bit ridiculous, but requiring people to install Go in order to build is slightly # more ridiculous IMO. To save you from scrolling, this is the last part of the podspec. diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 9785d150e42..da404e2fefa 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -202,6 +202,6 @@ # TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path? s.prepare_command = <<-END_OF_COMMAND - find src/core/ -type f -exec sed -E -i '.back' 's;#include "third_party/nanopb/(.*)";#include ;g' {} \\\; + find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include ;g' {} \\\; END_OF_COMMAND end