Skip to content
Snippets Groups Projects
Commit 2789a62c authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing update target

parent 59bcb163
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
http://openfpm.mpi-cbg.de/upload/update_dev
http://openfpm.mpi-cbg.de/upload/update_110
openfpm.mpi-cbg.de/upload/update_0.8
openfpm.mpi-cbg.de/upload/upgrade_110
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment