aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-08-09 11:34:57 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-08-09 11:34:57 +0300
commit00c3363ca258f160b875ec254e701017be0314db (patch)
treeb26354d65c93a093b750d0c44adb1f2905f9e160 /build.sh
parentb91c09a43b3191d719781fe717fc6d28fec58029 (diff)
add readme and demo image
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