Commit 3fae4de2 authored by incardon's avatar incardon

Fixing update openfpm

parent 05ae85a7
......@@ -7,7 +7,8 @@ source script/pre_req
source script/remove_old
source script/set_mpi
source script/conf_PETSC
source script/update_openfpm
source script/upgrade_openfpm
## Check that your home is not empty
......@@ -16,8 +17,6 @@ if [ x"$HOME" == x"" ]; then
exit 1
fi
##
install_req=1
i_dir=" "
sq=0
......@@ -63,6 +62,11 @@ while getopts :di:smhc:nu FLAG; do
esac
done
### Configure options
i_dir_old=$i_dir
configure_options_old=$configure_options
discover_os
## Remove old dependencies and installations
......@@ -84,10 +88,12 @@ fi
if [ $update_openfpm -eq 1 ]; then
update_openfpm
exit 0
fi
if [ $upgrade_openfpm -eq 1 ]; then
upgrade_openfpm
exit 0
fi
## clone the dependencies
......@@ -496,6 +502,11 @@ echo ""
echo ""
if [ $conf_err -eq 0 ]; then
echo -e "Install summary\033[92;5;1m SUCCEED \033[0m"
## Save dependencies dir and foward options
echo "$i_dir_old" > dependencies_dir
echo "$configure_options_old" > foward_options
else
echo -e "Install summary\033[91;5;1m FAILED \033[0m"
fi
......
......@@ -5,6 +5,8 @@ function HELP {
echo -e \\n"\033[1mHelp documentation for install\033[0m"\\n
echo -e "Basic usage: install [options]"\\n
echo -e " \033[1mOptions:\033[0m"
echo -e " \033[1;34m-n\033[0m upgrade openfpm, it upgrades openfpm to the new version"
echo -e " \033[1;34m-u\033[0m update openfpm, it updates the current openfpm release with the latest bug fixes"
echo -e " \033[1;34m-i\033[0m directory Set the directory where to install the required dependencies"
echo -e " \033[1;34m-d\033[0m disable installation of requirements"
echo -e " \033[1;34m-s\033[0m skip user input"
......
......@@ -14,13 +14,16 @@ function update_openfpm()
url_update=$(cat update)
echo "Checking for update from $url_update"
branch=$(wget $url_update)
rm tmp_brc
wget -O tmp_brc $url_update
branch=$(cat tmp_brc)
echo "Update branch $branch"
if [ x"$branch" == x"" ]; then
echo -e "\033[1m There are no-updates \033[0m"
return
fi
actual_branch=git branch | grep \* | cut -d ' ' -f2
actual_branch=$(git branch | grep \* | cut -d ' ' -f2)
if [ x"$branch" == x"actual_branch" ]; then
......
http://openfpm.mpi-cbg.de/upload/update_0.8
openfpm.mpi-cbg.de/upload/update_0.8
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