getamdis_cmake.sh 1.18 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
if test -e ./AMDiS ; then
  echo "there is already an AMDiS directory. I will abort. "
  exit 1
fi

ERROR=""
DOWNLOAD="OK"
svn --username studentiwr co https://gforge.zih.tu-dresden.de/svn/amdis/trunk amdis
if test $? -ne 0 ; then
  DOWNLOAD="NOT OK"
  ERROR="DOWNLOAD"
fi
if test "$1" ; then
  prefix="$1"
else
  prefix=$(pwd)/amdis_installed
fi
echo "prefix: ${prefix}"
if test ! -d ${prefix} ; then
  mkdir --parents ${prefix}
fi
if test ! -d amdis_build ; then
  mkdir amdis_build
fi
cd amdis_build
CONFIGURING="OK"
cmake -DCMAKE_INSTALL_PREFIX=${prefix} ../AMDiS 
if test $? -ne 0; then
  CONFIGURING="NOT OK"
  ERROR="${ERROR} CONFIGURE"
fi
COMPILE="OK"
make
if test $? -ne 0; then
  COMPILE="NOT OK"
  ERROR="${ERROR} COMPILE"
fi
INSTALLING="OK"
make install
if test $? -ne 0; then
  INSTALLING="NOT OK"
  ERROR="${ERROR} INSTALL"
fi
if test -z "${ERROR}"; then
  echo "amdis was successfully downloaded, configured and installed to ${prefix}"
Naumann, Andreas's avatar
Naumann, Andreas committed
46
  echo "you can use this installation in cmake with the AMDIS_DIR ${prefix}/share/amdis"
47
48
49
50
51
52
53
else
  echo "something went wrong: "
  echo "download:  ${DOWNLOAD}"
  echo "configure: ${CONFIGURING}"
  echo "compile:   ${COMPILE}"
  echo "install:   ${INSTALLING}"
fi