From 732b19c51707f0909a9ab36b31d62f4d2f4b245e Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 6 May 2010 20:30:08 +0930 Subject: [PATCH] misc: added convert version check in split_card script --- frontends/wix/images/split_card.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontends/wix/images/split_card.sh b/frontends/wix/images/split_card.sh index b9ff0d97..087f0562 100755 --- a/frontends/wix/images/split_card.sh +++ b/frontends/wix/images/split_card.sh @@ -37,6 +37,18 @@ get_card_name() 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"