From 00c3363ca258f160b875ec254e701017be0314db Mon Sep 17 00:00:00 2001 From: kartofen Date: Tue, 9 Aug 2022 11:34:57 +0300 Subject: add readme and demo image --- build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'build.sh') 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 -- cgit v1.2.3