Some fixes + improvements (Vector) + code reformatting
[cgds.git] / test / makeMain.sh
... / ...
CommitLineData
1#/bin/bash
2
3#initialize main.c
4printf '#include <stdlib.h>\n' > main.c
5printf '\n' >> main.c
6printf 'int main(int argc, char** argv)\n' >> main.c
7printf '{\n' >> main.c
8
9#add functions
10for file in `find . -type f -name \*.c ! -name main.c`; do
11 printf "\t//file $file :\n" >> main.c
12 functions=`grep '^ *void t_' $file | sed 's/^ *void \([^(]*\).*/\t\1();/g'`
13 printf "$functions" >> main.c
14 printf '\n\n' >> main.c
15done
16
17#finalize main.c
18printf '\treturn 0;\n' >> main.c
19printf '}\n' >> main.c