Exit on failure of being able to write medium sized images
authorBrett Parker <arch@sommitrealweird.co.uk>
Sat, 12 May 2007 14:11:14 +0000 (14:11 +0000)
committerBrett Parker <arch@sommitrealweird.co.uk>
Sat, 12 May 2007 14:11:14 +0000 (14:11 +0000)
* Exit on failure of being able to write medium sized images
* Fix up README to contain the new variables for medium sized images

git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--1.1--patch-3

README
bpgallery.sh

diff --git a/README b/README
index 81c0a4ed02955628fccb88b75ab596273eab17bc..0678ce978882b51100af845a3dfdc6eee5615ed3 100644 (file)
--- a/README
+++ b/README
@@ -22,18 +22,40 @@ bpgallery.sh /path/to/image/files
 
 Also, the following files, if placed in the images directory, will be used to
 generate part of the index page:
-        description.txt - a simple text file containing paragraphs to go at the
-                          beginnings of the index page
-        captions.txt - filename<tab>caption style file, it'll add a caption to
-                       the images on the index page.
+        description.txt
+            a simple text file containing paragraphs to go at the beginnings of
+            the index page
+        captions.txt
+            filename<tab>caption style file, it'll add a caption to the images
+            on the index page.
+
 The following environment variables can also be used:
-        TITLE - the title of the gallery
-        WIDTH - the width to make the icons
-        BPGALLERY_THEME - set the theme to use (described below)
-        BPGALLERY_THEME_DIR - set an extra location to look for themes
-        OUTPUTHTML - sets the script output to be wrapped in a <pre> block
-        GENERATEPAGESFORFULLSIZE - decide wether to generate pages for the full
-                                   size images or not
+        TITLE
+            the title of the gallery
+
+        WIDTH
+            the width to make the icons
+
+        MEDIUMWIDTH
+            set the width of images in the medium size pages
+
+        BPGALLERY_THEME
+            set the theme to use (described below)
+
+        BPGALLERY_THEME_DIR
+            set an extra location to look for themes
+
+        OUTPUTHTML
+            sets the script output to be wrapped in a <pre> block
+
+        GENERATEPAGESFORMEDIUMSIZE
+            generate medium sized images and pages
+
+        GENERATEPAGESFORFULLSIZE
+            decide wether to generate pages for the full size images or not
+
+        INDEXDOCUMENT
+            name of the index page (e.g. index.html)
 
 Example Usage:
         TITLE="My Funky Gallery" bpgallery.sh /path/to/image/files
@@ -72,13 +94,13 @@ The functions that you need to declare are as follows:
                 what's it for?:
                         Whatever is in here is generated per thumbnail.
                 available variables:
-                       $link        - the page/image to link to
+                        $link        - the page/image to link to
                         $filename    - the name of the file
                         $caption     - the caption as got from captions.txt
-       bpgallery_ThemeName_page()
-               what's it for?:
+        bpgallery_ThemeName_page()
+                what's it for?:
                         It generates the pages for fullsize image pages
-               available variables:
+                available variables:
                         $filename    - the name of the image
                         $previouspage - the URL for the previous page
                         $currentpage - the url for the current page
index 4cc74509a68b7d305ec3f50dcb03645e9f1268b7..f4aa372ee6b4588f5dbab02bff5152234aa0b84e 100755 (executable)
@@ -399,6 +399,7 @@ function generate_medium() {
 
        if [ ! -w medium ]; then
                $ECHOCOMMAND "Can't write to medium directory, exiting"
+               exit 32
        fi
        
        generate_resized_images $MEDIUMWIDTH medium