diff options
Diffstat (limited to 'pkg.sh')
-rwxr-xr-x | pkg.sh | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,10 +1,19 @@ #!/bin/sh std_things="io arr" cd std + +VALGRIND="valgrind --track-origins=yes --exit-on-first-error=yes --error-exitcode=1 -q" +if [ "$1" = "nov" ]; then + VALGRIND="" +fi +if [ "$CC" = "" ]; then + CC=gcc +fi + for thing in $std_things; do - valgrind --track-origins=yes --exit-on-first-error=yes --error-exitcode=1 -q ../toc $thing.toc -o $thing.c || exit 1 + $VALGRIND ../toc $thing.toc -o $thing.c || exit 1 done cd .. -valgrind --track-origins=yes --exit-on-first-error=yes --error-exitcode=1 -q ./toc test.toc || exit 1 -gcc out.c std/*.c || exit 1 +$VALGRIND ./toc test.toc || exit 1 +$CC out.c std/*.c || exit 1 ./a.out |