occlum/demos/grpc/prepare_client_server.sh
He Sun 6d7597c25e Polish gRPC and remote attestation demos
1. Disable zlib _explictly_ when building libcurl in remote attestaion demo.
The reason for this is that zlib may be implictly linked by the build system of
libcurl but not the zlib library is not copied into the Occlum FS image.
2. Use `make -j$(nproc)`
3. Fix typos
2020-01-23 04:40:54 +00:00

33 lines
584 B
Bash
Executable File

#!/bin/sh
DEMO_DIR=$PWD
cd $DEMO_DIR/grpc/examples/cpp/helloworld
git apply $DEMO_DIR/Makefile.patch
if [ $? -ne 0 ]
then
echo "patch failed"
exit 1
fi
cp $DEMO_DIR/grpc/examples/protos/helloworld.proto .
cd $DEMO_DIR
mkdir -p client
mkdir -p server
cp -R grpc/examples/cpp/helloworld/* client
cp -R grpc/examples/cpp/helloworld/* server
cd grpc
git checkout examples/cpp/helloworld/Makefile
cd ..
rm -rf client/cocoapods/
rm -rf client/cmake_externalproject/
rm client/CMakeLists.txt
rm -rf server/cocoapods/
rm -rf server/cmake_externalproject/
rm server/CMakeLists.txt