From: vsr Date: Thu, 9 Jun 2005 12:40:33 +0000 (+0000) Subject: Update check products version number procedures X-Git-Tag: V_2_2_4~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ebdfa547de7ad5829f217e9b38933ae1342f743a;p=tools%2Finstall.git Update check products version number procedures --- diff --git a/config_files/CAS-5.2.3.sh b/config_files/CAS-5.2.3.sh index 9e41221..ccca989 100755 --- a/config_files/CAS-5.2.3.sh +++ b/config_files/CAS-5.2.3.sh @@ -12,8 +12,8 @@ fi ver_major=`grep "!define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'` ver_minor=`grep "!define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'` ver="$ver_major.$ver_minor" -if [ "$ver" == "5.2" ] ; then - return 0 +if [ "$ver" != "5.2" ] ; then + return 1 fi # above check if only for major and minor version numbers # we need also the check for the release version number diff --git a/config_files/CAS-5.2.sh b/config_files/CAS-5.2.sh index 5e3a633..819bff1 100755 --- a/config_files/CAS-5.2.sh +++ b/config_files/CAS-5.2.sh @@ -2,12 +2,17 @@ check_version() { -#check existence of Open CASCADE 5.2 -#unfortunately we can't say nothing exactly about Open CASCADE 5.2 -#and we only check CASROOT env.variable -if [ -n "$CASROOT" ]; then - #echo "You have installed version of Open CASCADE in a $CASROOT" - #echo "Please check version number (You need 5.2)" +if [ -z "$CASROOT" ]; then + return 1 +fi +check_lib_version ${CASROOT}/inc/Standard_Version.hxx +if [ "$?" -ne "0" ] ; then + return 1 +fi +ver_major=`grep "!define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'` +ver_minor=`grep "!define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'` +ver="$ver_major.$ver_minor" +if [ "$ver" == "5.2" ] ; then return 0 fi return 1 @@ -18,7 +23,7 @@ print_env() cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh < ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh </dev/null` +if [ -n isdot ]; then + ver=`dot -V 2>&1 | awk '{print $3}'` + if [ "$ver" == "1.9" ]; then + return 0 + fi fi return 1 } diff --git a/config_files/graphviz-2.2.1.sh b/config_files/graphviz-2.2.1.sh index f4f1a5c..a3880fb 100755 --- a/config_files/graphviz-2.2.1.sh +++ b/config_files/graphviz-2.2.1.sh @@ -2,9 +2,12 @@ check_version() { -ver=`dot -V 2>&1 | awk '{print $3}'` -if [ "$ver" == "2.2.1" ]; then - return 0 +isdot=`which dot 2>/dev/null` +if [ -n isdot ]; then + ver=`dot -V 2>&1 | awk '{print $3}'` + if [ "$ver" == "2.2.1" ]; then + return 0 + fi fi return 1 }