fix problems in Queue.c / Stack.c ; still issues: to investigate
[cgds.git] / test / makeMain.sh
... / ...
CommitLineData
1#/bin/bash
2#TODO: dispatch in several files and run in parallel ?!
3
4#initialize main.c
5printf '#include <stdlib.h>\n' > main.c
6printf '\n' >> main.c
7printf 'int main(int argc, char** argv)\n' >> main.c
8printf '{\n' >> main.c
9
10#add functions
11for file in `find . -type f -name \*.c ! -name main.c`; do
12 printf "\t//file $file :\n" >> main.c
13 functions=`grep "//FTEST" $file | sed 's/void \(.\+\) \/\/FTEST/\t\1;/g'`
14 printf "$functions" >> main.c
15 printf "\n\n" >> main.c
16done
17
18#finalize main.c
19printf "\treturn 0;\n" >> main.c
20printf '}\n' >> main.c