# HG changeset patch # User Goffi # Date 1273143608 -34200 # Node ID 21f83796a293e724353922948e9a8e6359d6a1e9 # Parent 104a815bb23f06c7b1ad7ad13502464ff6e08325 misc: added convert version check in split_card script diff -r 104a815bb23f -r 21f83796a293 frontends/wix/images/split_card.sh --- 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"