Commit | Line | Data |
---|---|---|
a7868768 | 1 | #/bin/bash |
a7868768 BA |
2 | |
3 | #initialize main.c | |
4 | printf '#include <stdlib.h>\n' > main.c | |
5 | printf '\n' >> main.c | |
6 | printf 'int main(int argc, char** argv)\n' >> main.c | |
7 | printf '{\n' >> main.c | |
8 | ||
9 | #add functions | |
10 | for 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 |
15 | done |
16 | ||
17 | #finalize main.c | |
8306616e | 18 | printf '\treturn 0;\n' >> main.c |
a7868768 | 19 | printf '}\n' >> main.c |