Skip to content

Commit 39311a0

Browse files
committed
change the default rpc_type to grpc in this sample-playmaker
1 parent 2f992f5 commit 39311a0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/download-proxy.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ tar -xvf soccer-simulation-proxy.tar.gz
3333

3434
mv soccer-simulation-proxy/* .
3535

36+
echo "Inserting code to start.sh..."
37+
38+
sed -i '/rpc_type="thrift"/a\
39+
if [ -f ".env" ]; then\n\
40+
source .env\n\
41+
if [ -n "$RPC_TYPE" ]; then\n\
42+
rpc_type="$RPC_TYPE"\n\
43+
fi\n\
44+
fi' start.sh
45+
46+
47+
if [ ! -f ".env" ]; then
48+
echo "Creating .env file with default content..."
49+
echo "RPC_TYPE=grpc" > .env
50+
fi
51+
3652
rm -rf soccer-simulation-proxy
3753

3854
rm soccer-simulation-proxy.tar.gz

0 commit comments

Comments
 (0)