From b4534760a9c8a9f5a8b5ba8995a8bdb61f7c2947 Mon Sep 17 00:00:00 2001
From: Toke Eskildsen <te@ekot.dk>
Date: Mon, 6 Jan 2014 15:20:31 +0100
Subject: [PATCH] Bugfix: If presentation was disabled and tiling enabled,
 quack still attempted to generate tiles for the non-existing presentation
 image

---
 quack.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/quack.sh b/quack.sh
index e45cb44..944e367 100755
--- a/quack.sh
+++ b/quack.sh
@@ -401,8 +401,10 @@ function makeImages() {
             deepzoom "$CONV" -format $IMAGE_DISP_EXT -path "${DEST_FOLDER}/"
         fi
         if shouldGenerate "$FORCE_TILES" "$PRESENTATION_TILE_FOLDER" "tiles"; then
+            if [ ".true" == ".$PRESENTATION" ]; then
         # TODO: Specify JPEG quality
-            deepzoom "$PRESENTATION_IMAGE" -format $PRESENTATION_IMAGE_DISP_EXT -path "${DEST_FOLDER}/"
+                deepzoom "$PRESENTATION_IMAGE" -format $PRESENTATION_IMAGE_DISP_EXT -path "${DEST_FOLDER}/"
+            fi
         fi
     fi
 
-- 
GitLab