awesome/build-utils/layoutgen.sh
Julien Danjou 0142f0efc9 [layout] Rename LayoutArrange to layout_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 15:11:59 +02:00

18 lines
455 B
Bash
Executable file

#!/bin/sh
top_srcdir="${1-.}"
echo "/* This file is autogenerated by" $(basename $0) "*/"
echo
echo "const name_func_link_t LayoutList[] ="
echo "{"
for file in ${top_srcdir}/layouts/*.h
do
echo " /* $file */"
grep '^layout_t layout_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read layout
do
shortname=$(echo $layout | cut -d _ -f2-)
echo " {\"$shortname\", $layout},"
done
done
echo " {NULL, NULL}"
echo "};"