Commit 96759102 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Adding remove old script to remove old installations

parent c2e8e8c5
......@@ -4,6 +4,7 @@ source script/help
source script/discover_os
source script/show_solutions
source script/pre_req
source script/remove_old
##
......@@ -39,6 +40,10 @@ done
discover_os
## Remove old dependencies and installations
remove_old $i_dir
## Check and try to install the prerequisites
pre_req
......
openfpm_data @ 5e0680ec
Subproject commit 8055e4edb15d5b4bf2ea12b5b64186a46203f378
Subproject commit 5e0680ec6f7e0e39269356315571ac0580caad35
openfpm_io @ fd5290c9
Subproject commit 7988298e26138d0470851e9053e6640511793363
Subproject commit fd5290c92c6d87ce63890a4e591c0d1c2e98ced2
openfpm_vcluster @ 24fb89ec
Subproject commit d209394f00b1fe089f8c473465fd29da78a5ba48
Subproject commit 24fb89ec03a51ac994152ad39a28bf3bb780c129
......@@ -8,8 +8,8 @@ if [ -d "$1/BOOST" ]; then
fi
wget http://ppmcore.mpi-cbg.de/upload/boost_1_58_0.tar.bz2
tar -xvf boost_1_58_0.tar.bz2
cd boost_1_58_0
tar -xvf boost_1_60_0.tar.bz2
cd boost_1_60_0
./bootstrap.sh
mkdir $1/BOOST
./b2 -j 4 install --prefix=$1/BOOST
......
#! /bin/bash
function remove_old()
{
## Get the previos openFPM installation
previous_inst=$(cat $PWD/install_dir)
if [ x"$previous_inst"!=x"" ]; then
echo "Found previous installation"
if [ -d "$previous_inst/openfpm_pdata" ]; then
echo "Removing the folder: $previous_inst/openfpm_pdata"
rm -rf "$previous_inst/openfpm_pdata"
if [ -d "$previous_inst/openfpm_pdata" ]; then
echo -e "\033[91;5;1m Remove failed, manually remove the folder $previous_inst/openfpm_pdata, I am waiting ... \033[0m"
fi
while [ -d "$previous_inst/openfpm_pdata" ]
do
sleep 1
done
echo "Thanks"
fi
if [ -d "$previous_inst/openfpm_data" ]; then
echo "Removing the folder: $previous_inst/openfpm_data"
rm -rf "$previous_inst/openfpm_data"
if [ -d "$previous_inst/openfpm_data" ]; then
echo -e "\033[91;5;1m Remove failed, manually remove the folder $previous_inst/openfpm_data, I am waiting ... \033[0m"
fi
while [ -d "$previous_inst/openfpm_data" ]
do
sleep 1
done
echo "Thanks"
fi
if [ -d "$previous_inst/openfpm_devices" ]; then
echo "Removing the folder: $previous_inst/openfpm_devices"
rm -rf "$previous_inst/openfpm_devices"
if [ -d "$previous_inst/openfpm_devices" ]; then
echo -e "\033[91;5;1m Remove failed, manually remove the folder $previous_inst/openfpm_devices, I am waiting ... \033[0m"
fi
while [ -d "$previous_inst/openfpm_devices" ]
do
sleep 1
done
echo "Thanks"
fi
if [ -d "$previous_inst/openfpm_io" ]; then
echo "Removing the folder: $previous_inst/openfpm_io"
rm -rf "$previous_inst/openfpm_io"
if [ -d "$previous_inst/openfpm_io" ]; then
echo -e "\033[91;5;1m Remove failed, manually remove the folder $previous_inst/openfpm_io, I am waiting ... \033[0m"
fi
while [ -d "$previous_inst/openfpm_io" ]
do
sleep 1
done
echo "Thanks"
fi
if [ -d "$previous_inst/openfpm_vcluster" ]; then
echo "Removing the folder: $previous_inst/openfpm_vcluster"
rm -rf "$previous_inst/openfpm_vcluster"
if [ -d "$previous_inst/openfpm_vcluster" ]; then
echo -e "\033[91;5;1m Remove failed, manually remove the folder $previous_inst/openfpm_vcluster, I am waiting ... \033[0m"
fi
while [ -d "$previous_inst/openfpm_vcluster" ]
do
sleep 1
done
echo "Thanks"
fi
fi
## Check the installed version of the dependencies
if [ -f $1/BOOST/include/boost/version.hpp ]; then
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
fi
fi
}
remove_old "/home/i-bird"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment