Commit 3fae4de2 authored by incardon's avatar incardon

Fixing update openfpm

parent 05ae85a7
...@@ -7,7 +7,8 @@ source script/pre_req ...@@ -7,7 +7,8 @@ source script/pre_req
source script/remove_old source script/remove_old
source script/set_mpi source script/set_mpi
source script/conf_PETSC source script/conf_PETSC
source script/update_openfpm
source script/upgrade_openfpm
## Check that your home is not empty ## Check that your home is not empty
...@@ -16,8 +17,6 @@ if [ x"$HOME" == x"" ]; then ...@@ -16,8 +17,6 @@ if [ x"$HOME" == x"" ]; then
exit 1 exit 1
fi fi
##
install_req=1 install_req=1
i_dir=" " i_dir=" "
sq=0 sq=0
...@@ -63,6 +62,11 @@ while getopts :di:smhc:nu FLAG; do ...@@ -63,6 +62,11 @@ while getopts :di:smhc:nu FLAG; do
esac esac
done done
### Configure options
i_dir_old=$i_dir
configure_options_old=$configure_options
discover_os discover_os
## Remove old dependencies and installations ## Remove old dependencies and installations
...@@ -84,10 +88,12 @@ fi ...@@ -84,10 +88,12 @@ fi
if [ $update_openfpm -eq 1 ]; then if [ $update_openfpm -eq 1 ]; then
update_openfpm update_openfpm
exit 0
fi fi
if [ $upgrade_openfpm -eq 1 ]; then if [ $upgrade_openfpm -eq 1 ]; then
upgrade_openfpm upgrade_openfpm
exit 0
fi fi
## clone the dependencies ## clone the dependencies
...@@ -496,6 +502,11 @@ echo "" ...@@ -496,6 +502,11 @@ echo ""
echo "" echo ""
if [ $conf_err -eq 0 ]; then if [ $conf_err -eq 0 ]; then
echo -e "Install summary\033[92;5;1m SUCCEED \033[0m" 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 else
echo -e "Install summary\033[91;5;1m FAILED \033[0m" echo -e "Install summary\033[91;5;1m FAILED \033[0m"
fi fi
......
...@@ -5,6 +5,8 @@ function HELP { ...@@ -5,6 +5,8 @@ function HELP {
echo -e \\n"\033[1mHelp documentation for install\033[0m"\\n echo -e \\n"\033[1mHelp documentation for install\033[0m"\\n
echo -e "Basic usage: install [options]"\\n echo -e "Basic usage: install [options]"\\n
echo -e " \033[1mOptions:\033[0m" 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-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-d\033[0m disable installation of requirements"
echo -e " \033[1;34m-s\033[0m skip user input" echo -e " \033[1;34m-s\033[0m skip user input"
......
...@@ -14,13 +14,16 @@ function update_openfpm() ...@@ -14,13 +14,16 @@ function update_openfpm()
url_update=$(cat update) url_update=$(cat update)
echo "Checking for update from $url_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 if [ x"$branch" == x"" ]; then
echo -e "\033[1m There are no-updates \033[0m" echo -e "\033[1m There are no-updates \033[0m"
return return
fi fi
actual_branch=git branch | grep \* | cut -d ' ' -f2 actual_branch=$(git branch | grep \* | cut -d ' ' -f2)
if [ x"$branch" == x"actual_branch" ]; then 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