Mercurial > libervia-backend
changeset 82:21f83796a293
misc: added convert version check in split_card script
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 06 May 2010 20:30:08 +0930 |
parents | 104a815bb23f |
children | 1ac759ea28c3 |
files | frontends/wix/images/split_card.sh |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/wix/images/split_card.sh Sun Apr 18 15:47:10 2010 +1000 +++ b/frontends/wix/images/split_card.sh Thu May 06 20:30:08 2010 +0930 @@ -37,6 +37,18 @@ fi } +#We check the version of convert +CONVERT_VER=`convert --version | grep Version | grep -o "[0-9]\.[0-9]\.[0-9]"` +CONVERT_MAJOR=`echo $CONVERT_VER | cut -d . -f 1` +CONVERT_MINOR=`echo $CONVERT_VER | cut -d . -f 2` +CONVERT_REV=`echo $CONVERT_VER | cut -d . -f 3` + +if [ $CONVERT_MAJOR -lt 6 -o $CONVERT_MAJOR -eq 6 -a $CONVERT_MINOR -lt 6 ] +then + echo "ImageMagick convert must be at least version 6.6.0 (current: $CONVERT_VER)" + exit 1 +fi + current=`pwd` #TODO: check directory presence #echo "making directory"