-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
50 lines (41 loc) · 1.39 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
echo " ____ __ __ _____ _____ _____ "
echo " / __ \ \ \ / / | __ \| __ \ / ____|"
echo "| | | |_ _\ \ /\ / /_ _| |__) | | | | (___ "
echo "| | | | '_ \ \/ \/ / _' | _ /| | | |\___ \ "
echo "| |__| | | | \ /\ / (_| | | \ \| |__| |____) |"
echo " \____/|_| |_|\/ \/ \__,_|_| \_\_____/|_____/ "
echo "Maxime Lejeune - UCLouvain - 26.09.2022 v1.1"
echo ""
if [[ "$OSTYPE" == "linux-gnu" ]]; then
BASH_PATH=~/.bashrc
elif [[ "$OSTYPE" == "darwin"* ]]; then
if [ -n "$ZSH_VERSION" ]; then
BASH_PATH=~/.zshrc
elif [ -n "$BASH_VERSION" ]; then
BASH_PATH=~/.bash_profile
else
echo "Environment not recognised (currently supported: bash and zsh)"
return -1
fi
else
echo "OS not supported: please install manualy"
return -1
fi
# ------------------------------- #
echo ">> Configuring your OnWaRDS environment to ${BASH_PATH}."
echo "">>"$BASH_PATH"
echo "export ONWARDS_PATH=$(pwd)" >>"$BASH_PATH"
echo "export PYTHONPATH=\${PYTHONPATH}:\$ONWARDS_PATH" >>"$BASH_PATH"
export ONWARDS_PATH=$(pwd)
export PYTHONPATH=${PYTHONPATH}:${ONWARDS_PATH}
echo ">> Done!"
# ------------------------------- #
echo ">> Compiling the Lagrangian Flow Model sources."
make -C $ONWARDS_PATH/onwards/lagSolver/libc/ lagSolver_c.so
if [ $? -eq 0 ]; then
echo ">> Done!"
else
echo ">> Compilation failed."
return -1
fi
# # ------------------------------- #