Fix proto generation script

This commit is contained in:
Ben Meadors 2023-01-18 11:33:45 -06:00
parent 76847d9db3
commit 73bf7d1283

View file

@ -12,8 +12,17 @@ if [ ! -x "`which protoc`" ]; then
exit
fi
if [ ! -x "`which gsed`" ]; then
echo "Please install gnu-sed by running: brew install gnu-sed"
exit
fi
pdir=$(realpath "../protobufs/meshtastic")
sdir=$(realpath "./Meshtastic/Protobufs")
gsed -i 's/import "meshtastic\//import "/g' ../protobufs/meshtastic/*
gsed -i 's/package meshtastic;//g' ../protobufs/meshtastic/*
echo "pdir:$pdir sdir:$sdir"
pfiles="admin.proto apponly.proto cannedmessages.proto channel.proto config.proto device_metadata.proto deviceonly.proto localonly.proto mesh.proto module_config.proto mqtt.proto portnums.proto remote_hardware.proto rtttl.proto storeforward.proto telemetry.proto xmodem.proto"
for pf in $pfiles
@ -24,3 +33,5 @@ do
done
echo "Done generating the swift files from the proto files."
echo "Build, test, and commit changes."
cd ../protobufs/meshtastic && git reset --hard