From 48891b004a2759bb9eee2f6e710a121232358e9b Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Tue, 19 Apr 2005 22:01:24 +0000 Subject: [PATCH 1/1] Fix the image height code 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 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/bpgallery.sh b/bpgallery.sh index 719ff9c..ef403e7 100755 --- a/bpgallery.sh +++ b/bpgallery.sh @@ -254,17 +254,12 @@ $BPGALLERY_TAIL_FUNCTION >> index.html 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 .. +# add a bit to the maxheight for the size of the caption +MAXHEIGHT=$((MAXHEIGHT+75)) $BPGALLERY_STYLESHEET_FUNCTION > style.css -- 2.39.5