awesome/build-utils/widgetgen.sh

21 lines
574 B
Bash
Raw Normal View History

2008-01-16 08:06:59 +01:00
#!/bin/sh
top_srcdir="${1-.}"
2008-01-16 08:06:59 +01:00
echo "/* This file is autogenerated by" $(basename $0) "*/"
echo
echo "const name_func_link_t WidgetList[] ="
echo "{"
for file in ${top_srcdir}/widget.h
2008-01-16 08:06:59 +01:00
do
echo " /* $file */"
grep '^WidgetConstructor ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget
2008-01-16 08:06:59 +01:00
do
shortname=$(echo $widget | cut -d_ -f1)
echo " {\"$shortname\", $widget},"
grep -q "^$shortname" ${top_srcdir}/awesomerc.1.txt || \
2008-01-16 08:06:59 +01:00
echo " WARNING: $uicb NOT documented" >&2
done
done
echo " {NULL, NULL}"
echo "};"