summaryrefslogtreecommitdiff
path: root/pkg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkg.sh')
-rwxr-xr-xpkg.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkg.sh b/pkg.sh
index 5f1d847..1a397b5 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -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