Commit 3d5fd535 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Add option to download via ssh in install_all_dune_modules script

parent dc27612b
#!/usr/bin/env bash
USAGE_HELP="usage: $0 --prefix DUNE_BASE_DIR [--branch DUNE_BRANCH]"
USAGE_HELP="usage: $0 --prefix DUNE_BASE_DIR [--branch DUNE_BRANCH] [--ssh]"
PREFIX="-"
BRANCH="releases/2.7"
NUM_PROCS=$(nproc --all)
USE_SSH="0"
while [[ $# -gt 0 ]]
do
......@@ -26,6 +27,10 @@ case $key in
shift # past argument
shift # past value
;;
--ssh)
USE_SSH="1"
shift
;;
*) # unknown option
echo $USAGE_HELP
exit 1
......@@ -43,35 +48,42 @@ fi
mkdir -p ${PREFIX}
cd ${PREFIX}
BASE_URL="https://gitlab.dune-project.org"
if [[ "${USE_SSH}" -eq "1" ]]; then
BASE_URL="ssh://git@gitlab.dune-project.org:22022"
fi
CORE_MODULES=("dune-common" "dune-geometry" "dune-grid" "dune-istl" "dune-localfunctions")
STAGING_MODULES=("dune-functions" "dune-typetree" "dune-uggrid")
EXTENSIONS_MODULES=("dune-alugrid" "dune-foamgrid")
MISC_MODULES=("dune-vtk" "dune-gmsh4")
MISC_REPOS=("https://gitlab.mn.tu-dresden.de/iwr/dune-vtk.git" \
"https://gitlab.mn.tu-dresden.de/iwr/dune-gmsh4.git")
MISC_BRANCHES=("master" "master")
EXTENSIONS_MODULES=("dune-alugrid" "dune-foamgrid" "dune-vtk")
# download all modules by git
for MOD in ${CORE_MODULES[*]}; do
git clone https://gitlab.dune-project.org/core/${MOD}.git --branch ${BRANCH}
git clone ${BASE_URL}/core/${MOD}.git
git checkout -q ${BRANCH}
done
for MOD in ${STAGING_MODULES[*]}; do
git clone https://gitlab.dune-project.org/staging/${MOD}.git --branch ${BRANCH}
git clone ${BASE_URL}/staging/${MOD}.git
git checkout -q ${BRANCH}
done
for MOD in ${EXTENSIONS_MODULES[*]}; do
git clone https://gitlab.dune-project.org/extensions/${MOD}.git --branch ${BRANCH}
git clone ${BASE_URL}/extensions/${MOD}.git
git checkout -q ${BRANCH}
done
for I in ${!MISC_MODULES[*]}; do
git clone ${MISC_REPOS[$I]} --branch ${MISC_BRANCHES[$I]}
done
# create an options file
cat << EOF >> ${PREFIX}/config.opts
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS=\"-march=native\""
# create options files
cat << EOF >> ${PREFIX}/release.opts
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=\"-march=native\""
BUILDDIR="build-release"
MAKE_FLAGS="-j${NUM_PROCS}"
EOF
cat << EOF >> ${PREFIX}/debug.opts
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG=\"-g -Og\" -DCMAKE_CXX_FLAGS=\"-march=native -DAMDIS_INFO_LEVEL=2\""
BUILDDIR="build-debug"
MAKE_FLAGS="-j${NUM_PROCS}"
EOF
......@@ -82,5 +94,5 @@ echo " export DUNE_CONTROL_PATH=${PREFIX} "
echo " export PATH=${PREFIX}/dune-common/bin:\${PATH} "
echo " "
echo "In order to build all modules, run inside the ${PREFIX} dir "
echo " duncontrol --opts=${PREFIX}/config.opts all "
echo " duncontrol --opts=${PREFIX}/release.opts all "
echo "=============================================================="
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment