Skip to content
Snippets Groups Projects
Commit 3d578106 authored by Ned Coltman's avatar Ned Coltman
Browse files

Moved the git checkout operation out of the if statement.

Moved the chmod operation out of the if statement.
parent e2bf9f02
No related branches found
No related tags found
1 merge request!53Install Script fix
...@@ -36,18 +36,16 @@ echo "************************************************************************** ...@@ -36,18 +36,16 @@ echo "**************************************************************************
echo "(0/2) Downloading supplementary files. Make sure to be connected to the internet." echo "(0/2) Downloading supplementary files. Make sure to be connected to the internet."
echo "*********************************************************************************************" echo "*********************************************************************************************"
# download the install.opts and the test script # download the test script and the install.opts
if [ ! -f "test_dumux.sh" ]; then if [ ! -f "test_dumux.sh" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/scripts/test_dumux.sh wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/scripts/test_dumux.sh
chmod +x test_dumux.sh
fi fi
chmod +x test_dumux.sh
if [ ! -f "cmake.opts" ]; then if [ ! -f "cmake.opts" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/cmake.opts wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/cmake.opts
chmod +x test_dumux.sh
fi fi
# get the testing script
echo "*********************************************************************************************" echo "*********************************************************************************************"
echo "(1/2) Cloning repositories. This may take a while. Make sure to be connected to the internet." echo "(1/2) Cloning repositories. This may take a while. Make sure to be connected to the internet."
echo "*********************************************************************************************" echo "*********************************************************************************************"
...@@ -57,10 +55,10 @@ for MOD in common geometry grid localfunctions istl; do ...@@ -57,10 +55,10 @@ for MOD in common geometry grid localfunctions istl; do
git clone -b releases/$DUNE_VERSION https://gitlab.dune-project.org/core/dune-$MOD.git git clone -b releases/$DUNE_VERSION https://gitlab.dune-project.org/core/dune-$MOD.git
else else
echo "Skip cloning dune-$MOD because the folder already exists." echo "Skip cloning dune-$MOD because the folder already exists."
cd dune-$MOD
git checkout releases/$DUNE_VERSION
cd ..
fi fi
cd dune-$MOD
git checkout releases/$DUNE_VERSION
cd ..
done done
# extension modules # extension modules
...@@ -69,10 +67,10 @@ for MOD in dune-foamgrid dune-alugrid; do ...@@ -69,10 +67,10 @@ for MOD in dune-foamgrid dune-alugrid; do
git clone -b releases/$DUNE_VERSION https://gitlab.dune-project.org/extensions/$MOD.git git clone -b releases/$DUNE_VERSION https://gitlab.dune-project.org/extensions/$MOD.git
else else
echo "Skip cloning $MOD because the folder already exists." echo "Skip cloning $MOD because the folder already exists."
cd $MOD
git checkout releases/$DUNE_VERSION
cd ..
fi fi
cd $MOD
git checkout releases/$DUNE_VERSION
cd ..
done done
# dune-subgrid # dune-subgrid
...@@ -80,30 +78,30 @@ if [ ! -d "dune-subgrid" ]; then ...@@ -80,30 +78,30 @@ if [ ! -d "dune-subgrid" ]; then
git clone -b releases/$DUNE_VERSION-1 https://git.imp.fu-berlin.de/agnumpde/dune-subgrid.git git clone -b releases/$DUNE_VERSION-1 https://git.imp.fu-berlin.de/agnumpde/dune-subgrid.git
else else
echo "Skip cloning dune-subgrid because the folder already exists." echo "Skip cloning dune-subgrid because the folder already exists."
cd dune-subgrid
git checkout releases/$DUNE_VERSION-1
cd ..
fi fi
cd dune-subgrid
git checkout releases/$DUNE_VERSION-1
cd ..
# dumux # dumux
if [ ! -d "dumux" ]; then if [ ! -d "dumux" ]; then
git clone -b master https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git git clone -b master https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
else else
echo "Skip cloning dumux because the folder already exists." echo "Skip cloning dumux because the folder already exists."
cd dumux
git checkout dumux-course-2018
cd ..
fi fi
cd dumux
git checkout dumux-course-2018
cd ..
# dumux-course # dumux-course
if [ ! -d "dumux-course" ]; then if [ ! -d "dumux-course" ]; then
git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git
else else
echo "Skip cloning dumux-course because the folder already exists." echo "Skip cloning dumux-course because the folder already exists."
cd dumux-course
git checkout 2018
cd ..
fi fi
cd dumux-course
git checkout 2018
cd ..
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "*********************************************************************************************" echo "*********************************************************************************************"
......
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