forked from ecell/ecell4_base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·54 lines (48 loc) · 1.01 KB
/
install.sh
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
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
install_core()
{
# install ecell4-core
./waf distclean update --files="boost,doxygen" \
configure --prefix=${PREFIX} build install
return $?
}
install_submodule()
{
# install a submodule
if [ $# != 1 ]; then
return 1
fi
cd $1
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib \
LIBRARY_PATH=${LIBRARY_PATH}:${PREFIX}/lib \
CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${PREFIX}/include \
../waf distclean configure --prefix=${PREFIX} build install
VAL=$?
cd ..
return ${VAL}
}
# PREFIX=/usr/local
PREFIX=${HOME}/local
# PREFIX=
# SUBMODS=("bd" "gillespie" "ode")
SUBMODS=("bd" "gillespie")
if [ "$PREFIX" == "" ]; then
echo "\${PREFIX} is undefined."
exit 1
fi
if [ $# == 0 ]; then
TMP=("core" ${SUBMODS[@]})
else
TMP=$@
fi
for SUBMOD in ${TMP[@]}
do
if [ $SUBMOD == "core" ]; then
install_core
else
install_submodule $SUBMOD
fi
if [ $? != 0 ]; then
exit 1
fi
done