Skip to content
Snippets Groups Projects
Commit 8eaa94c3 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[installexternal] add cornerpoint, pdelab, and typetree

parent 18790edb
No related branches found
No related tags found
2 merge requests!31Feature/colebrookwhiteboundarylayer,!5Feature/externalscript
#!/bin/bash #!/bin/bash
CORRECT_LOCATION_FOR_DUNE_MODULES="n"
ENABLE_MPI="n" ENABLE_MPI="n"
ENABLE_DEBUG="n" ENABLE_DEBUG="n"
CLEANUP="n" CLEANUP="n"
...@@ -8,6 +9,51 @@ DOWNLOAD_ONLY="n" ...@@ -8,6 +9,51 @@ DOWNLOAD_ONLY="n"
TOPDIR=$(pwd) TOPDIR=$(pwd)
EXTDIR=$(pwd)/external EXTDIR=$(pwd)/external
checkLocationForDuneModules()
{
# test for directory dune-common, dune-common-2.4 etc.
if ! ls dune-common* &> /dev/null; then
echo "You have to call $0 for $1 from"
echo "the same directory in which dune-common is located."
echo "You cannot install it in this folder."
CORRECT_LOCATION_FOR_DUNE_MODULES="n"
return
fi
CORRECT_LOCATION_FOR_DUNE_MODULES="y"
}
createExternalDirectory()
{
if [ ! -e $EXTDIR ]; then
mkdir -v $EXTDIR
fi
}
installCornerpoint()
{
cd $TOPDIR
checkLocationForDuneModules dune-cornerpoint
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-cornerpoint ]; then
git clone -b release/2015.04 https://github.com/OPM/dune-cornerpoint
fi
if test "$DOWNLOAD_ONLY" == "y"; then
return
fi
if test "$CLEANUP" == "y"; then
rm -rf dune-cornerpoint
return
fi
cd $TOPDIR
}
installMETIS() installMETIS()
{ {
cd $EXTDIR cd $EXTDIR
...@@ -41,6 +87,11 @@ installMultidomain() ...@@ -41,6 +87,11 @@ installMultidomain()
{ {
cd $TOPDIR cd $TOPDIR
checkLocationForDuneModules dune-multidomain
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-multidomain ]; then if [ ! -e dune-multidomain ]; then
git clone -b releases/2.0 git://github.com/smuething/dune-multidomain.git git clone -b releases/2.0 git://github.com/smuething/dune-multidomain.git
fi fi
...@@ -54,14 +105,6 @@ installMultidomain() ...@@ -54,14 +105,6 @@ installMultidomain()
return return
fi fi
# test for directory dune-common, dune-common-2.4 etc.
if ! ls dune-common* &> /dev/null; then
echo "You have to call installExternal for dune-multidomain from"
echo "the same directory where dune-common is located. You"
echo "cannot install it in the external folder."
return
fi
cd $TOPDIR cd $TOPDIR
} }
...@@ -69,6 +112,11 @@ installMultidomainGrid() ...@@ -69,6 +112,11 @@ installMultidomainGrid()
{ {
cd $TOPDIR cd $TOPDIR
checkLocationForDuneModules dune-multidomaingrid
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-multidomaingrid ]; then if [ ! -e dune-multidomaingrid ]; then
git clone -b releases/2.3 git://github.com/smuething/dune-multidomaingrid.git git clone -b releases/2.3 git://github.com/smuething/dune-multidomaingrid.git
fi fi
...@@ -82,14 +130,6 @@ installMultidomainGrid() ...@@ -82,14 +130,6 @@ installMultidomainGrid()
return return
fi fi
# test for directory dune-common, dune-common-2.4 etc.
if ! ls dune-common* &> /dev/null; then
echo "You have to call installExternal for dune-multidomaingrid from"
echo "the same directory where dune-common is located. You"
echo "cannot install it in the external folder."
return
fi
# apply patch for dune versions newer than 2.3 # apply patch for dune versions newer than 2.3
cd dune-common cd dune-common
VERSION=`git status | head -n 1 | awk '{ print $3 }'` VERSION=`git status | head -n 1 | awk '{ print $3 }'`
...@@ -102,6 +142,56 @@ installMultidomainGrid() ...@@ -102,6 +142,56 @@ installMultidomainGrid()
cd $TOPDIR cd $TOPDIR
} }
installPDELab()
{
cd $TOPDIR
checkLocationForDuneModules dune-pdelab
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-pdelab ]; then
git clone -b releases/2.0 http://git.dune-project.org/repositories/dune-pdelab
fi
if test "$DOWNLOAD_ONLY" == "y"; then
return
fi
if test "$CLEANUP" == "y"; then
rm -rf dune-pdelab
return
fi
cd $TOPDIR
}
installTypeTree()
{
cd $TOPDIR
checkLocationForDuneModules dune-typetree
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-typetree ]; then
git clone -b releases/2.3 http://git.dune-project.org/repositories/dune-typetree
fi
if test "$DOWNLOAD_ONLY" == "y"; then
return
fi
if test "$CLEANUP" == "y"; then
rm -rf dune-typetree
return
fi
cd $TOPDIR
}
installUG() installUG()
{ {
cd $EXTDIR cd $EXTDIR
...@@ -151,30 +241,18 @@ installUG() ...@@ -151,30 +241,18 @@ installUG()
cd $TOPDIR cd $TOPDIR
} }
installAll()
{
installMETIS
installMultidomain
installMultidomainGrid
installUG
}
createExternalDirectory()
{
if [ ! -e $EXTDIR ]; then
mkdir -v $EXTDIR
fi
}
usage() usage()
{ {
echo "Usage: $0 [OPTIONS] PACKAGES" echo "Usage: $0 [OPTIONS] PACKAGES"
echo "" echo ""
echo "Where PACKAGES is one or more of the following" echo "Where PACKAGES is one or more of the following"
echo " all Install everything and the kitchen sink." echo " all Install everything and the kitchen sink."
echo " cornerpoint Download dune-cornerpoint."
echo " metis Install the METIS graph partitioner." echo " metis Install the METIS graph partitioner."
echo " multidomain Download dune-multidomain." echo " multidomain Download dune-multidomain."
echo " multidomaingrid Download dune-multidomaingrid." echo " multidomaingrid Download and patch dune-multidomaingrid."
echo " pdelab Download dune-pdelab."
echo " typetree Download dune-typetree."
echo " ug Install the UG grid library." echo " ug Install the UG grid library."
echo "" echo ""
echo "The following options are recoginzed:" echo "The following options are recoginzed:"
...@@ -235,7 +313,17 @@ for TMP in "$@"; do ...@@ -235,7 +313,17 @@ for TMP in "$@"; do
all) all)
SOMETHING_DONE="y" SOMETHING_DONE="y"
createExternalDirectory createExternalDirectory
installAll installCornerpoint
installMETIS
installMultidomain
installMultidomainGrid
installPDELab
installTypeTree
installUG
;;
cornerpoint|dune-cornerpoint)
SOMETHING_DONE="y"
installCornerpoint
;; ;;
metis) metis)
SOMETHING_DONE="y" SOMETHING_DONE="y"
...@@ -250,6 +338,14 @@ for TMP in "$@"; do ...@@ -250,6 +338,14 @@ for TMP in "$@"; do
SOMETHING_DONE="y" SOMETHING_DONE="y"
installMultidomainGrid installMultidomainGrid
;; ;;
pdelab|dune-pdelab)
SOMETHING_DONE="y"
installPDELab
;;
typetree|dune-typetree)
SOMETHING_DONE="y"
installTypeTree
;;
ug) ug)
SOMETHING_DONE="y" SOMETHING_DONE="y"
createExternalDirectory createExternalDirectory
......
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