forked from cellmodeller/CellModeller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstallCellModellerLinux64_public.sh
More file actions
executable file
·77 lines (66 loc) · 2.72 KB
/
Copy pathInstallCellModellerLinux64_public.sh
File metadata and controls
executable file
·77 lines (66 loc) · 2.72 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
clear
echo "********************************************************************************"
echo "* *"
echo "* CellModeller Installer *"
echo "* ---------------------------- *"
echo "* *"
echo "* This installer script will: *"
echo "* *"
echo "* 1. Install CellModeller and dependencies into Anaconda python *"
echo "* 2. Create your own ~/cellmodeller local CellModeller environment *"
echo "* 3. Add some environment variables to your bash_profile/bashrc *"
echo "* *"
echo "********************************************************************************"
echo
# Install dependencies
echo
echo 1. Installing CellModeller and dependencies via Anaconda...
echo ------------------------------------------------------------
echo
command -v conda >/dev/null 2>&1 || { echo "You must install Anaconda before running this installer..." >&2; exit 1; }
conda create -yn cellmodeller
source activate cellmodeller
conda install -yc trudge cellmodeller
THIS_DIR="`dirname $0`"
echo
echo 2. Setting up user environment in $HOME/cellmodeller...
echo -------------------------------------------------------
echo
# Setup the users cellmodeller directory with scripts etc.
#
# TODO: user option here to choose directory location
#
CMDIR=$HOME/cellmodeller
DATADIR=$CMDIR/data
MODELDIR=$CMDIR/Models
EXAMPLEDIR=$CMDIR/Examples
SCRIPTDIR=$CMDIR/Scripts
DOCDIR=$CMDIR/Doc
BINDIR=$CMDIR/bin
# Create CellModeller dir in user home area
mkdir -p $CMDIR
mkdir -p $DATADIR
mkdir -p $BINDIR
mkdir -p $MODELDIR
#mkdir -p $EXAMPLEDIR
#mkdir -p $SCRIPTDIR
#mkdir -p $DOCDIR
# Copy required stuff
cp -Ri $THIS_DIR/PackageFiles/Scripts $CMDIR
cp -Ri $THIS_DIR/PackageFiles/Doc $CMDIR
cp -Ri $THIS_DIR/PackageFiles/Examples $CMDIR
cp $THIS_DIR/PackageFiles/cmgui $BINDIR/
cp $THIS_DIR/PackageFiles/cmpython $BINDIR/
echo
echo 3. Adding paths to bash_profile
echo -------------------------------------------------------
echo
# Put an environment variable in bash_profile to tell CellModeller where things are
# Also append our bin dir to PATH
touch $HOME/.bashrc
touch $HOME/.bash_profile
echo export CMPATH=$CMDIR >> $HOME/.bash_profile
echo export "PATH=$BINDIR:$PATH" >> $HOME/.bash_profile
echo export CMPATH=$CMDIR >> $HOME/.bashrc
echo export "PATH=$BINDIR:$PATH" >> $HOME/.bashrc