wmii/cmd/wm/mklayout.sh

13 lines
414 B
Bash
Raw Normal View History

2005-11-18 18:54:58 +03:00
#!/bin/sh
rm -f layoutdef.h layoutdef.c layout.mk
echo "#include \"layoutdef.h\"" > layoutdef.c
echo "#include \"wm.h\"" >> layoutdef.c
echo "void init_layouts() {" >> layoutdef.c
2005-11-18 18:54:58 +03:00
for i in `ls layout_*.c`; do
FUNC="`echo \`basename $i\` | sed 's/\.c//g'`"
echo "void init_$FUNC();" >> layoutdef.h
echo " init_$FUNC();" >> layoutdef.c;
echo "SRC += $i" >>layoutdef.mk
2005-11-18 18:54:58 +03:00
done
echo "}" >> layoutdef.c