summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0bb2d08)
* Make the head command also specifiable.
git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--0.9.2--patch-3
IDENTIFYCOMMAND=/usr/bin/identify
fi
IDENTIFYCOMMAND=/usr/bin/identify
fi
+if [[ -z $HEADCOMMAND ]]; then
+ HEADCOMMAND=/usr/bin/head
+fi
+
if [[ -z $WIDTH ]]; then
WIDTH=100
fi
if [[ -z $WIDTH ]]; then
WIDTH=100
fi
for imageext in $IMAGEEXTENSIONS; do
if ( ls "*.$imageext" > /dev/null 2>/dev/null ); then
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 | head -n 1)
+ 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
if [[ $TEMPMAX -gt $MAXHEIGHT ]]; then
MAXHEIGHT=$TEMPMAX
fi