From 607127d46e4fe028d7315441d16f118c6aed979d Mon Sep 17 00:00:00 2001 From: mkinney Date: Sun, 23 Jan 2022 15:15:14 -0800 Subject: [PATCH] Update regen-protos.sh --- bin/regen-protos.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/regen-protos.sh b/bin/regen-protos.sh index 169f509..bcbed5e 100755 --- a/bin/regen-protos.sh +++ b/bin/regen-protos.sh @@ -5,11 +5,11 @@ # workaround for import bug in protoc https://github.com/protocolbuffers/protobuf/issues/1491#issuecomment-690618628 if [[ $OSTYPE == 'darwin'* ]]; then - sed -i -E 's/^\(import.*_pb2\)/from . \1/' meshtastic/*.py + sed -i '' -E 's/^\(import.*_pb2\)/from . \1/' meshtastic/*.py + # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/Meshtastic-protobufs/issues/27) + sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py else - sed -i -E 's/^import.*_pb2/from . \0/' meshtastic/*.py + sed -i -e 's/^import.*_pb2/from . \0/' meshtastic/*.py + # automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/Meshtastic-protobufs/issues/27) + sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py fi - - -# automate the current workaround (may be related to Meshtastic-protobufs issue #27 https://github.com/meshtastic/Meshtastic-protobufs/issues/27) -sed -i '' -e "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py