summaryrefslogtreecommitdiff
path: root/src/gen_message.sh
blob: 47b81e69d1441e3b69d0a0124294386c583b0594 (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
	underscore_name=$(echo "$message" | sed -e "s/\([a-z]\)\([A-Z]\)/\1_\L\2/g" -e "s/[A-Z]*/\L\0/g")
	echo -e "\tMUMBLE_MSG(${message}, ${underscore_name}) \\"
done
echo
echo "#endif"