diff --git a/install b/install index cda09e31de1ddb2218ec61d6dc891f2905046087..ea3344d135277476c556996147fb96f0728a469c 100755 --- a/install +++ b/install @@ -8,7 +8,6 @@ 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 @@ -87,12 +86,12 @@ if [ $update_openfpm -eq 1 -a $upgrade_openfpm -eq 1 ]; then fi if [ $update_openfpm -eq 1 ]; then - update_openfpm + update_openfpm update exit 0 fi if [ $upgrade_openfpm -eq 1 ]; then - upgrade_openfpm + upgrade_openfpm upgrade exit 0 fi diff --git a/script/update_openfpm b/script/update_openfpm index db7a6c571c5b171744e8c3e5fa06bfefc3491f62..1d58478f4af13965a64af58e8a5b6eb9f7d69407 100755 --- a/script/update_openfpm +++ b/script/update_openfpm @@ -12,7 +12,7 @@ function update_openfpm() ## Get the name of the updating branch - url_update=$(cat update) + url_update=$(cat $1) echo "Checking for update from $url_update" rm tmp_brc wget -O tmp_brc $url_update @@ -25,7 +25,7 @@ function update_openfpm() actual_branch=$(git branch | grep \* | cut -d ' ' -f2) - if [ x"$branch" == x"actual_branch" ]; then + if [ x"$branch" == x"$actual_branch" ]; then git remote update git status -uno | grep "nothing to commit" @@ -36,7 +36,7 @@ function update_openfpm() fi fi -# git stash +# git stash -u # git submodule foreach 'git stash' # git pull origin @@ -44,6 +44,7 @@ function update_openfpm() # git submodule update # sh autogen.sh +# make clean # make install } diff --git a/script/upgrade_openfpm b/script/upgrade_openfpm deleted file mode 100755 index fd9ff8589f5a4e8f4f95283e1544d7cff3a0811e..0000000000000000000000000000000000000000 --- a/script/upgrade_openfpm +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/bash - -source script/show_solutions - -function upgrade_openfpm() -{ - echo -e "\033[1;5;31m WARNING: the update will destroy any changes in the OpenFPM source code \033[0m" - - commands[0]="Continue" - commands[0]="${commands[@]}" - possible_solutions "${commands[@]}" - - ## Get the name of the updating branch - - url_upgrade=$(cat upgrade) - echo "Checking for update from $url_update" - branch=$(wget $url_upgrade) - 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 - - if [ x"$branch" == x"actual_branch" ]; then - -# git remote update -# git status -uno | grep "nothing to commit" - - if [ $? -eq 0 ]; then - echo -e "\033[1m There are no-updates \033[0m" - return - fi - fi - -# git stash -# git submodule foreach 'git stash' - -# git pull origin -# git checkout $branch -# git submodule update - -# sh autogen.sh -# make install - -} - -