titlebar: correctly ban/unban (FS#443)
[awesome.git] / build-utils / widgetgen.sh
blobae71b0bd362a355bf111fedcfdcac8306ddd053d
1 #!/bin/sh
2 top_srcdir="${1-.}"
3 echo "/* This file is autogenerated by" `basename $0` "*/"
4 echo
5 echo "const name_func_link_t WidgetList[] ="
6 echo "{"
7 for file in ${top_srcdir}/widget.h
8 do
9 echo " /* $file */"
10 grep '^widget_constructor_t ' "$file" | cut -d' ' -f2 | cut -d\; -f1 | while read widget
12 shortname=`echo $widget | cut -d_ -f2`
13 echo " {\"$shortname\", sizeof(\"$shortname\") - 1, $widget},"
14 done
15 done
17 echo " {NULL, 0, NULL}"
18 echo "};"