Commit e4d7513e authored by Praetorius, Simon's avatar Praetorius, Simon

update the install_all script

parent 7ee95763
Pipeline #5144 passed with stage
in 41 minutes and 49 seconds
#!/usr/bin/env bash
USAGE_HELP="usage: $0 --prefix DUNE_BASE_DIR [--branch DUNE_BRANCH] [--misc] [--np NUM_PROCS]"
USAGE_HELP="usage: $0 --prefix DUNE_BASE_DIR [--branch DUNE_BRANCH]"
PREFIX="/opt/dune"
BRANCH="master"
NUM_PROCS=$(nproc --all)
INSTALL_MISC="0"
while [[ $# -gt 0 ]]
do
......@@ -22,10 +21,6 @@ case $key in
shift # past argument
shift # past value
;;
-m|--misc)
INSTALL_MISC="1"
shift
;;
-n|--np)
NUM_PROCS="$2"
shift # past argument
......@@ -52,13 +47,14 @@ CORE_MODULES=("dune-common" "dune-geometry" "dune-grid" "dune-istl" "dune-localf
STAGING_MODULES=("dune-functions" "dune-typetree" "dune-uggrid")
EXTENSIONS_MODULES=("dune-alugrid" "dune-spgrid" "dune-foamgrid")
MISC_MODULES=("dune-vtk" "dune-curvedsurfacegrid" "dune-curvedgeometry" "dune-blocked")
MISC_REPOS=("https://gitlab.mn.tu-dresden.de/spraetor/dune-vtk.git" \
"https://gitlab.mn.tu-dresden.de/iwr/dune-curvedsurfacegrid.git" \
"https://gitlab.mn.tu-dresden.de/spraetor/dune-curvedgeometry.git" \
"https://gitlab.mn.tu-dresden.de/spraetor/dune-blocked.git")
MISC_MODULES=("dune-vtk" "dune-gmsh4" "dune-curvedsurfacegrid" "dune-curvedgeometry")
MISC_REPOS=("https://gitlab.mn.tu-dresden.de/iwr/dune-vtk.git" \
"https://gitlab.mn.tu-dresden.de/iwr/dune-gmsh4.git" \
"https://gitlab.mn.tu-dresden.de/iwr/dune-curvedgrid.git" \
"https://gitlab.mn.tu-dresden.de/iwr/dune-curvedgeometry.git")
MISC_BRANCHES=("master" "master" "master" "master")
# download all modules by git
for MOD in ${CORE_MODULES[*]}; do
git clone https://gitlab.dune-project.org/core/${MOD}.git --branch ${BRANCH}
done
......@@ -71,25 +67,22 @@ for MOD in ${EXTENSIONS_MODULES[*]}; do
git clone https://gitlab.dune-project.org/extensions/${MOD}.git --branch ${BRANCH}
done
if [[ "$INSTALL_MISC" == "1" ]]; then
for I in ${!MISC_MODULES[*]}; do
git clone ${MISC_REPOS[$I]} --branch ${MISC_BRANCHES[$I]}
done
fi
for I in ${!MISC_MODULES[*]}; do
git clone ${MISC_REPOS[$I]} --branch ${MISC_BRANCHES[$I]}
done
cat << EOF >> ${PREFIX}/default.opts
# create an options file
cat << EOF >> ${PREFIX}/config.opts
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS=\"-march=native\""
MAKE_FLAGS="-j${NUM_PROCS}"
EOF
DUNE_CONTROL_PATH=${PREFIX} ${PREFIX}/dune-common/bin/dunecontrol --opts=${PREFIX}/default.opts all
echo ""
echo "=============================================================="
echo "You can add the following lines to you .bashrc file "
echo " export DUNE_CONTROL_PATH=${PREFIX} "
echo " export PATH=${PREFIX}/dune-common/bin:\${PATH} "
echo "You can add the following lines to you .bashrc file "
echo " export DUNE_CONTROL_PATH=${PREFIX} "
echo " export PATH=${PREFIX}/dune-common/bin:\${PATH} "
echo " "
echo "In order to compile your module, just run "
echo " duncontrol --opts=${PREFIX}/default.opts --current all "
echo "=============================================================="
\ No newline at end of file
echo " duncontrol --opts=${PREFIX}/config.opts --current 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