diff --git a/install b/install index 86e7251a959f166aa3485d1e868213b213e62598..cda09e31de1ddb2218ec61d6dc891f2905046087 100755 --- a/install +++ b/install @@ -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 diff --git a/script/help b/script/help index f277f40b916def5e8b6a3a876200ea01bf8852e5..0fa98a16d7f0b7cea927634cbb88bf596e4ded21 100755 --- a/script/help +++ b/script/help @@ -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" diff --git a/script/update_openfpm b/script/update_openfpm index c7427d059fe8ae60456018b5a3f893dd332d267e..db7a6c571c5b171744e8c3e5fa06bfefc3491f62 100755 --- a/script/update_openfpm +++ b/script/update_openfpm @@ -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 diff --git a/update b/update new file mode 100644 index 0000000000000000000000000000000000000000..c2f6a8c22a0d146fe12e7b87f929d1f46ffbab11 --- /dev/null +++ b/update @@ -0,0 +1 @@ +http://openfpm.mpi-cbg.de/upload/update_0.8 diff --git a/upgrade b/upgrade new file mode 100644 index 0000000000000000000000000000000000000000..5674d18a3accad269d3fae22b3247edca6ef7d70 --- /dev/null +++ b/upgrade @@ -0,0 +1 @@ + openfpm.mpi-cbg.de/upload/update_0.8