awesome/build-utils/uicbgen.sh
Julien Danjou e33d6cae80 [uicb] Rename Uicb type to uicb_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00

18 lines
461 B
Bash
Executable file

#!/bin/sh
top_srcdir="${1-.}"
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
do
echo " /* $file */"
grep '^uicb_t uicb_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read uicb
do
shortname=$(echo $uicb | cut -d _ -f2-)
echo " {\"$shortname\", $uicb},"
done
done
echo " {NULL, NULL}"
echo "};"