]> git.sommitrealweird.co.uk Git - bpgallery.git/commitdiff
Fix the image height code
authorBrett Parker <arch@sommitrealweird.co.uk>
Tue, 19 Apr 2005 22:01:24 +0000 (22:01 +0000)
committerBrett Parker <arch@sommitrealweird.co.uk>
Tue, 19 Apr 2005 22:01:24 +0000 (22:01 +0000)
Make the max height of the icons actually be calculated.

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

bpgallery.sh

index 719ff9cc3943529eea5e73d95f977b5a799b5671..ef403e75db53369134e680b595f4488e4402f535 100755 (executable)
@@ -254,17 +254,12 @@ $BPGALLERY_TAIL_FUNCTION >> index.html
 
 cd icons
 
 
 cd icons
 
-for imageext in $IMAGEEXTENSIONS; do
-       if ( ls "*.$imageext" > /dev/null 2>/dev/null ); then
-               TEMPMAX=$($IDENTIFYCOMMAND *.$imageext | grep "Geometry:" | sed -r 's#^.*Geometry:.*?[0-9]+x([0-9]+)\+.*$#\1#' | $SORTCOMMAND -g -r | $HEADCOMMAND -n 1)
-               if [[ $TEMPMAX -gt $MAXHEIGHT ]]; then
-                       MAXHEIGHT=$TEMPMAX
-               fi
-       fi
-done
+MAXHEIGHT=$($FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 $IDENTIFYCOMMAND -format "%h\n" | $GREPCOMMAND -v "^$" | $SORTCOMMAND -g -r | $HEADCOMMAND -n 1)
 
 cd ..
 
 
 cd ..
 
+# add a bit to the maxheight for the size of the caption
+MAXHEIGHT=$((MAXHEIGHT+75))
 
 $BPGALLERY_STYLESHEET_FUNCTION > style.css
 
 
 $BPGALLERY_STYLESHEET_FUNCTION > style.css