mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
25 lines
909 B
Bash
Executable file
25 lines
909 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# simple sanity checking for repo
|
|
if [ ! -d "../Meshtastic-protobufs" ]; then
|
|
echo "Please check out the https://github.com/meshtastic/Meshtastic-protobufs the parent directory."
|
|
exit
|
|
fi
|
|
|
|
# simple sanity checking for executable
|
|
if [ ! -x "`which protoc`" ]; then
|
|
echo "Please install switf-protobuf by running: brew install switf-proto"
|
|
exit
|
|
fi
|
|
|
|
pdir=$(realpath "../Meshtastic-protobufs")
|
|
sdir=$(realpath "./MeshtasticClient/Protobufs")
|
|
echo "pdir:$pdir sdir:$sdir
|
|
pfiles="admin.proto apponly.proto cannedmessages.proto channel.proto deviceonly.proto environmental_measurement.proto mesh.proto mqtt.proto portnums.proto radioconfig.proto remote_hardware.proto storeforward.proto"
|
|
for pf in $pfiles
|
|
do
|
|
echo "Generating $pf..."
|
|
protoc --swift_out=${sdir} --proto_path=${pdir} $pf
|
|
done
|
|
echo "Done generating the swift files from the proto files."
|
|
echo "Build, test, and commit changes."
|