X-Git-Url: https://git.sommitrealweird.co.uk/bpgallery.git/blobdiff_plain/6963072c036aaa910c0f2e46218bb289042bc915..48891b004a2759bb9eee2f6e710a121232358e9b:/bpgallery.sh diff --git a/bpgallery.sh b/bpgallery.sh index 96cd77f..ef403e7 100755 --- a/bpgallery.sh +++ b/bpgallery.sh @@ -19,7 +19,7 @@ set -f -VERSION="0.9.2+arch" +VERSION="0.9.3" function bpgallery_default_head() { cat <> 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