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

Fixing update and upgrade openfpm

parent 3fae4de2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
}
......
#! /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
}
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