diff --git a/script/remove_old b/script/remove_old index 56d1b51c2161f351704d5292d8568fb61540286e..28bc6340af39afea18cc83b676419c80a70ebb40 100755 --- a/script/remove_old +++ b/script/remove_old @@ -74,16 +74,31 @@ function remove_old() fi ## Check the installed version of the dependencies - - is_update=$(cat $1/BOOST/include/boost/version.hpp | grep "#define BOOST_VERSION 106000") - if [ x"$is_update" == x"" ]; then - echo "New boost version, removing the old one" - rm -rf $1/BOOST/include - rm -rf $1/BOOST/lib - rm -rf $1/BOOST + + cat $1/BOOST/include/boost/version.hpp > /dev/null + if [ $? -eq 0 ]; then + is_update=$(cat $1/BOOST/include/boost/version.hpp | grep "#define BOOST_VERSION 106000") + if [ x"$is_update" == x"" ]; then + echo "\033[1;34;5m New boost version, removing the old one \033[0m" + sleep 3 + rm -rf $1/BOOST/include + rm -rf $1/BOOST/lib + rm -rf $1/BOOST + fi fi - + ## + cat $1/METIS/version + if [ $? -eq 0 ]; then + version=$(cat $1/METIS/version) + if [ x"$version" != x"1" ]; then + echo -e "\033[1;34;5m New METIS version, removing the old one \033[0m" + sleep 3 + rm -rf $1/METIS/include + rm -rf $1/METIS/lib + rm -rf $1/METIS + fi + fi }