Used a safer filter

pull/19653/head
Tony Lu 5 years ago
parent 881e038529
commit a07b669ce6
  1. 4
      gRPC-Core.podspec
  2. 4
      templates/gRPC-Core.podspec.template

@ -1387,7 +1387,7 @@ 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
sed -E -i '' 's;#include "(pb(_.*)?\\.h)";#if COCOAPODS==1\\\n #include <nanopb/\\1>\\\n#else\\\n #include "\\1"\\\n#endif;g' $(find src/core -type f -print | xargs grep -H -c '#if COCOAPODS==1' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include <openssl/(.*)>;#if COCOAPODS==1\\\n #include <openssl_grpc/\\1>\\\n#else\\\n #include <openssl/\\1>\\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#if COCOAPODS==1' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include "(pb(_.*)?\\.h)";#if COCOAPODS==1\\\n #include <nanopb/\\1>\\\n#else\\\n #include "\\1"\\\n#endif;g' $(find src/core -type f -print | xargs grep -H -c '#include <nanopb/' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include <openssl/(.*)>;#if COCOAPODS==1\\\n #include <openssl_grpc/\\1>\\\n#else\\\n #include <openssl/\\1>\\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include <openssl_grpc/' | grep 0$ | cut -d':' -f1)
END_OF_COMMAND
end

@ -212,7 +212,7 @@
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
s.prepare_command = <<-END_OF_COMMAND
sed -E -i '' 's;#include "(pb(_.*)?\\.h)";#if COCOAPODS==1\\\n #include <nanopb/\\1>\\\n#else\\\n #include "\\1"\\\n#endif;g' $(find src/core -type f -print | xargs grep -H -c '#if COCOAPODS==1' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include <openssl/(.*)>;#if COCOAPODS==1\\\n #include <openssl_grpc/\\1>\\\n#else\\\n #include <openssl/\\1>\\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#if COCOAPODS==1' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include "(pb(_.*)?\\.h)";#if COCOAPODS==1\\\n #include <nanopb/\\1>\\\n#else\\\n #include "\\1"\\\n#endif;g' $(find src/core -type f -print | xargs grep -H -c '#include <nanopb/' | grep 0$ | cut -d':' -f1)
sed -E -i '' 's;#include <openssl/(.*)>;#if COCOAPODS==1\\\n #include <openssl_grpc/\\1>\\\n#else\\\n #include <openssl/\\1>\\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include <openssl_grpc/' | grep 0$ | cut -d':' -f1)
END_OF_COMMAND
end

Loading…
Cancel
Save