blob: 4b0d1f8c639f4b44348d503f24f39ed7b2ae1591 (
plain)
1
2
3
4
5
6
7
8
9
|
echo "static const struct { const ProtobufCMessageDescriptor *descriptor; const char *name; } messages[] = {"
while read message
do
#lower_name=$(echo $message | tr '[:upper:]' '_[:lower:]' | sed "s/^_\(.*\)$/\1/")
prefixed_lower_name=$(echo "$message" | sed "s/\(^\|[a-z]\)\([A-Z][A-Z]*\)/\1_\L\2/g")
echo -e "\t/* ${message} */ { &mumble_proto_${prefixed_lower_name}__descriptor, \"$message\" },"
done
echo "};"
|