Some fixes + improvements (Vector) + code reformatting
[cgds.git] / test / makeMain.sh
CommitLineData
a7868768 1#/bin/bash
a7868768
BA
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
6860e373 12 functions=`grep '^ *void t_' $file | sed 's/^ *void \([^(]*\).*/\t\1();/g'`
a7868768 13 printf "$functions" >> main.c
8306616e 14 printf '\n\n' >> main.c
a7868768
BA
15done
16
17#finalize main.c
8306616e 18printf '\treturn 0;\n' >> main.c
a7868768 19printf '}\n' >> main.c