cosmin / shared-profile

shared-profile / install.sh
100755 31 lines (23 sloc) 0.822 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
#!/usr/bin/env bash
 
OS="`uname`"
INSTALL_LOCATION="`pwd`"
 
if [[ $OS = "Darwin" ]]; then
BASHRC="~/.profile"
    defaults write ~/.MacOSX/environment SHARED_PROFILE_HOME $INSTALL_LOCATION
    echo "Added SHARED_PROFILE_HOME to ~/.MacOSX/environment"
else
BASHRC="~/.bashrc"
    echo "export SHARED_PROFILE_HOME=$INSTALL_LOCATION" >> $BASHRC
    echo "Added SHARED_PROFILE_HOME to ~/.bashrc"
fi
 
echo "source $INSTALL_LOCATION/setup.sh" >> $BASHRC
echo "Added Shared Profile setup.sh to Bash"
 
echo '(load (concat (getenv "SHARED_PROFILE_HOME") "/" "setup.el"))' >> ~/.emacs
echo "Added Shared Profile setup.el to Emacs"
 
git submodule update --init
 
CWD=`pwd`
cd cljenv
git submodule update --init
cd $CWD
 
echo "Initialized all the externals"
touch ~/.clj_completions # this file must exist or bad things happen