Salome HOME
fix a bug with 'test -n' option
[tools/install.git] / config_files / graphviz-1.9.sh
index ef4a872227725c4735be070f7bb331b095ec25b8..b28c4bcfc1da9da03db109c7622d8de6403e8022 100755 (executable)
@@ -2,10 +2,12 @@
 
 check_version()
 {
-check_lib_version dot ${PATH}
-if [ "$?" -eq "0" ]; then
-   #echo "The product ${PRODUCT} has been already installed on yours system"
-   return 0
+isdot=`which dot 2>/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
 }