mirror of
https://github.com/bisq-network/bisq-api-reference.git
synced 2026-01-26 17:33:33 +00:00
Change sed command's -i opt-value for MacOS
This commit is contained in:
parent
2e229fbdf6
commit
3171316ea7
@ -17,5 +17,13 @@ protoc --proto_path=$PROTO_PATH --python_out=$PYTHON_PROTO_OUT_PATH $PROTO_PATH/
|
||||
|
||||
# Hack the internal import statements in the generated python to prepend the `bisq.api` package name.
|
||||
# See why Google will not fix this: https://github.com/protocolbuffers/protobuf/issues/1491
|
||||
sed -i 's/import pb_pb2 as pb__pb2/import bisq.api.pb_pb2 as pb__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2.py
|
||||
sed -i 's/import grpc_pb2 as grpc__pb2/import bisq.api.grpc_pb2 as grpc__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2_grpc.py
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
sed -i 's/import pb_pb2 as pb__pb2/import bisq.api.pb_pb2 as pb__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2.py
|
||||
sed -i 's/import grpc_pb2 as grpc__pb2/import bisq.api.grpc_pb2 as grpc__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2_grpc.py
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' 's/import pb_pb2 as pb__pb2/import bisq.api.pb_pb2 as pb__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2.py
|
||||
sed -i '' 's/import grpc_pb2 as grpc__pb2/import bisq.api.grpc_pb2 as grpc__pb2/g' $PYTHON_PROTO_OUT_PATH/grpc_pb2_grpc.py
|
||||
else
|
||||
echo "Unsupported OS $OSTYPE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user