From 2789a62cb75e0e3a18d88f94675a2541dd96ffbd Mon Sep 17 00:00:00 2001 From: Pietro Incardona Date: Thu, 19 Apr 2018 16:33:25 +0200 Subject: [PATCH] Fixing update target --- script/update_openfpm | 26 +++++++++++--------------- update | 2 +- upgrade | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/script/update_openfpm b/script/update_openfpm index 07843d2..21463aa 100755 --- a/script/update_openfpm +++ b/script/update_openfpm @@ -4,10 +4,8 @@ source script/show_solutions function update_openfpm() { - echo -e "\033[1;5;31m WARNING: the update will destroy any changes in the OpenFPM source code \033[0m" + echo -e "\033[1;5;31m WARNING: the update will destroy any changes you made in the OpenFPM source code \033[0m" - commands[0]="Continue" - commands[0]="${commands[@]}" possible_solutions "${commands[@]}" ## Get the name of the updating branch @@ -16,26 +14,25 @@ function update_openfpm() echo "Checking for update from $url_update" rm tmp_brc wget -O tmp_brc $url_update - branch=$(cat tmp_brc) - echo "Update branch $branch" - if [ x"$branch" == x"" ]; then + repo=$(cat tmp_brc) + echo "Update repo $repo" + if [ x"$repo" == 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 set-url origin "$repo" - git remote update - n_commit=$(git rev-list --count origin/$branch...$branch) + git remote update + n_commit=$(git rev-list --count origin/master...master) - if [ $n_commit -eq 0 ]; then - echo -e "\033[1m There are no-updates \033[0m" - return - fi + if [ $n_commit -eq 0 ]; then + echo -e "\033[1m There are no-updates \033[0m" + return fi + dir_prev_inst=$(cat dependencies_dir) for_opt=$(cat foward_options) if [ x"$dir_prev_inst" != x"" ]; then @@ -50,7 +47,6 @@ function update_openfpm() git submodule foreach 'git stash' git pull origin - git checkout $branch git submodule update #### Check if we have to force upgrade diff --git a/update b/update index 71880b9..3f1d8a0 100644 --- a/update +++ b/update @@ -1 +1 @@ -http://openfpm.mpi-cbg.de/upload/update_dev +http://openfpm.mpi-cbg.de/upload/update_110 diff --git a/upgrade b/upgrade index 5674d18..38b6ea7 100644 --- a/upgrade +++ b/upgrade @@ -1 +1 @@ - openfpm.mpi-cbg.de/upload/update_0.8 +openfpm.mpi-cbg.de/upload/upgrade_110 -- 2.22.0