From 9fbde7b85aab93fbd95e4e86e708576b72a60a90 Mon Sep 17 00:00:00 2001 From: foglet15 Date: Sun, 25 Feb 2024 13:40:28 -0500 Subject: [PATCH] change regen to unmodified --- bin/regen-protobufs.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/regen-protobufs.sh b/bin/regen-protobufs.sh index 9dc3bf9..447c91f 100755 --- a/bin/regen-protobufs.sh +++ b/bin/regen-protobufs.sh @@ -4,16 +4,16 @@ #gsed -i 's/import "\//import ".\//g' ./protobufs/meshtastic/* #gsed -i 's/package meshtastic;//g' ./protobufs/meshtastic/* -./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./meshtastic/pbDefinitions ./protobufs/meshtastic/*.proto +./nanopb-0.4.7/generator-bin/protoc -I=protobufs --python_out ./ ./protobufs/meshtastic/*.proto # 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/pbDefinitions/*.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/protobufs/issues/27) - sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/pbDefinitions/mesh_pb2.py + sed -i '' -E "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py else - sed -i -e 's/^import.*_pb2/from . \0/' meshtastic/pbDefinitions/*.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/protobufs/issues/27) - sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/pbDefinitions/mesh_pb2.py + sed -i -e "s/^None = 0/globals()['None'] = 0/" meshtastic/mesh_pb2.py fi