scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#!/bin/sh
 2
 3rm -f tmp_test.c
 4rm -f tests.h
 5rm -f tmp_*.c
 6
 7(echo '#include "tests.h"'
 8echo 'int main()'
 9echo '{'
10
11for i in *-*.c
12do
13	n=`echo $i | sed 's/\(.*\)-.*\.c/\1/'`
14	sed s/main/main_$n/ < $i > tmp_$n.c
15	echo "int main_$n();" >> tests.h
16	printf "\tif (main_$n()) return -1;\n"
17done
18
19printf '\treturn 0;\n}\n'
20) > tmp_test.c