summaryrefslogtreecommitdiff
path: root/src/gen_message.sh
blob: 147e8a654c391776a6726700be2de3fe8bd856df (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
echo "#ifndef _MESSAGES_H_"
echo "#define _MESSAGES_H_"
echo "#define MUMBLE_MSGS \\"
while read message
do
	prefixed_lower_name=$(echo "$message" | sed "s/\(^\|[a-z]\)\([A-Z][A-Z]*\)/\1_\L\2/g")
	echo -e "\tMUMBLE_MSG(${message}, ${prefixed_lower_name}) \\"
done
echo
echo "#endif"