-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
executable file
·37 lines (27 loc) · 1.31 KB
/
install
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
#!/bin/bash
RMANAGERPATH=$( pwd )
if [ $SHELL == /bin/bash ] ; then
echo your shell is bash
echo RMANAGER will append environment variables to your .bashrc
echo '#------------ RMANAGER -----------------------#' >> $HOME/.bashrc
echo "export RMANAGERPATH=$RMANAGERPATH " >> $HOME/.bashrc
echo 'export PYTHONPATH=${PYTHONPATH}'":${RMANAGERPATH}/src/python" >> $HOME/.bashrc
echo "export SCRATCH=${HOME}" >> $HOME/.bashrc
echo 'SCRATCH (= where the model will run )' set to $HOME by default, you may want to change this
. $HOME/.bashrc
elif [ $SHELL == /bin/csh ] ; then
echo your shell is csh
echo RMANAGER will append environment variables to your .cshrc
echo '#------------ RMANAGER -----------------------#' >> $HOME/.cshrc
echo "setenv RMANAGERPATH $RMANAGERPATH " >> $HOME/.cshrc
echo 'setenv PYTHONPATH ${PYTHONPATH}'":${RMANAGERPATH}/src/python" >> $HOME/.cshrc
echo "setenv SCRATCH ${HOME}" >> $HOME/.cshrc
echo 'SCRATCH (= where the model will run )' set to $HOME by default, you may want to change this
source $HOME/.cshrc
else
echo only bash and csh are currently supported
fi
userlogin=$( whoami )
echo 'Creating user ' $userlogin in $RMANAGERPATH/user/$userlogin
echo 'this is your user space for config files, ocean.in,...'
mkdir $RMANAGERPATH/user/$userlogin