aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 84a12e8..6c4860e 100755
--- a/build.sh
+++ b/build.sh
@@ -9,6 +9,12 @@ ODIR="obj"
BIN="bin"
VALGRND=""
+RUN=0
+
+function run {
+ RUN=1
+}
+
function leak {
VALGRND="valgrind --leak-check=full"
}
@@ -37,5 +43,8 @@ gcc -o $BIN/wfc $ODIR/main.o $ODIR/ppm.o $ODIR/tiles.o $FLAGS
gcc -o $BIN/gen_tiles $ODIR/gen_tiles.o $ODIR/ppm.o $FLAGS
-$VALGRND $BIN/gen_tiles
-$VALGRND $BIN/wfc
+if ! { [[ $RUN -eq 0 ]]; } 2> /dev/null
+then
+ $VALGRND $BIN/gen_tiles
+ $VALGRND $BIN/wfc
+fi