Meshtastic-Apple/gen_protos.sh
Matthew Davies 36ba2e4508
Update readme to include better info about protos submodule init
Update gen_protos.sh to check the proper directory and echo the command
2024-03-28 21:33:55 -07:00

18 lines
550 B
Bash
Executable file

#!/bin/bash
# simple sanity checking for repo
if [ ! -d "./protobufs" ]; then
echo 'Please check out the protobuf submodule by running: `git submodule update --init`'
exit
fi
# simple sanity checking for executable
if [ ! -x "$(which protoc)" ]; then
echo 'Please install swift-protobuf by running: `brew install swift-protobuf`'
exit
fi
protoc --proto_path=./protobufs --swift_out=./Meshtastic/Protobufs ./protobufs/meshtastic/*.proto
echo "Done generating the swift files from the proto files."
echo "Build, test, and commit changes."