awesome/build-utils/uicbgen.sh

19 lines
461 B
Bash
Raw Normal View History

2008-01-15 16:52:30 +01:00
#!/bin/sh
top_srcdir="${1-.}"
2008-01-15 16:52:30 +01:00
echo "/* This file is autogenerated by" $(basename $0) "*/"
echo
echo "const name_func_link_t UicbList[] ="
echo "{"
for file in ${top_srcdir}/*.h ${top_srcdir}/layouts/*.h
2008-01-15 16:52:30 +01:00
do
echo " /* $file */"
grep '^uicb_t uicb_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read uicb
2008-01-15 16:52:30 +01:00
do
shortname=$(echo $uicb | cut -d _ -f2-)
echo " {\"$shortname\", $uicb},"
done
done
echo " {NULL, NULL}"
echo "};"