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 "**************************************************************************
echo "(0/2) Downloading supplementary files. Make sure to be connected to the internet."
echo "*********************************************************************************************"
# download the install.opts and the test script
# download the test script and the install.opts
if [ ! -f "test_dumux.sh" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/scripts/test_dumux.sh
chmod +x test_dumux.sh
fi
chmod +x test_dumux.sh
if [ ! -f "cmake.opts" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/cmake.opts
chmod +x test_dumux.sh
fi
# get the testing script
echo "*********************************************************************************************"
echo "(1/2) Cloning repositories. This may take a while. Make sure to be connected to the internet."
echo "*********************************************************************************************"
......@@ -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
else
echo "Skip cloning dune-$MOD because the folder already exists."
cd dune-$MOD
git checkout releases/$DUNE_VERSION
cd ..
fi
cd dune-$MOD
git checkout releases/$DUNE_VERSION
cd ..
done
# extension modules
......@@ -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
else
echo "Skip cloning $MOD because the folder already exists."
cd $MOD
git checkout releases/$DUNE_VERSION
cd ..
fi
cd $MOD
git checkout releases/$DUNE_VERSION
cd ..
done
# dune-subgrid
......@@ -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
else
echo "Skip cloning dune-subgrid because the folder already exists."
cd dune-subgrid
git checkout releases/$DUNE_VERSION-1
cd ..
fi
cd dune-subgrid
git checkout releases/$DUNE_VERSION-1
cd ..
# dumux
if [ ! -d "dumux" ]; then
git clone -b master https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
else
echo "Skip cloning dumux because the folder already exists."
cd dumux
git checkout dumux-course-2018
cd ..
fi
cd dumux
git checkout dumux-course-2018
cd ..
# dumux-course
if [ ! -d "dumux-course" ]; then
git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git
else
echo "Skip cloning dumux-course because the folder already exists."
cd dumux-course
git checkout 2018
cd ..
fi
cd dumux-course
git checkout 2018
cd ..
if [ $? -ne 0 ]; then
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