From 39311a022e5f134bdb3a6e7996640aa27c514bf2 Mon Sep 17 00:00:00 2001 From: SK2iP Date: Mon, 21 Oct 2024 21:00:17 +0330 Subject: [PATCH 1/2] change the default rpc_type to grpc in this sample-playmaker --- scripts/download-proxy.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/download-proxy.sh b/scripts/download-proxy.sh index 58bbba8..aaf497e 100755 --- a/scripts/download-proxy.sh +++ b/scripts/download-proxy.sh @@ -33,6 +33,22 @@ tar -xvf soccer-simulation-proxy.tar.gz mv soccer-simulation-proxy/* . +echo "Inserting code to start.sh..." + +sed -i '/rpc_type="thrift"/a\ +if [ -f ".env" ]; then\n\ + source .env\n\ + if [ -n "$RPC_TYPE" ]; then\n\ + rpc_type="$RPC_TYPE"\n\ + fi\n\ +fi' start.sh + + +if [ ! -f ".env" ]; then + echo "Creating .env file with default content..." + echo "RPC_TYPE=grpc" > .env +fi + rm -rf soccer-simulation-proxy rm soccer-simulation-proxy.tar.gz From d39a18fa80fdbba90bf0420367e5094e80d56171 Mon Sep 17 00:00:00 2001 From: SK2iP Date: Mon, 28 Oct 2024 22:30:16 +0330 Subject: [PATCH 2/2] Change default rpc_type to grpc in download-proxy.sh --- scripts/download-proxy.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/download-proxy.sh b/scripts/download-proxy.sh index aaf497e..a944a10 100755 --- a/scripts/download-proxy.sh +++ b/scripts/download-proxy.sh @@ -35,19 +35,7 @@ mv soccer-simulation-proxy/* . echo "Inserting code to start.sh..." -sed -i '/rpc_type="thrift"/a\ -if [ -f ".env" ]; then\n\ - source .env\n\ - if [ -n "$RPC_TYPE" ]; then\n\ - rpc_type="$RPC_TYPE"\n\ - fi\n\ -fi' start.sh - - -if [ ! -f ".env" ]; then - echo "Creating .env file with default content..." - echo "RPC_TYPE=grpc" > .env -fi +sed -i 's/rpc_type="thrift"/rpc_type="grpc"/' start.sh rm -rf soccer-simulation-proxy