forked from jigish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.Darwin.sh
executable file
·51 lines (43 loc) · 1.38 KB
/
config.Darwin.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
#!/bin/bash
CURRDIR=`pwd`
if [[ "$TERM_PROGRAM" == "iTerm.app" ]] ; then
printf "\n> You appear to be running this script from within iTerm.app which could\n"
printf " overwrite your new preferences on quit.\n"
printf "> Please quit iTerm and run this from Terminal.app or an SSH session.\n"
printf " Cheers.\n\n"
exit 3
fi
if ps wwwaux | egrep -q 'iTerm\.app' >/dev/null ; then
printf "\n> You appear to have iTerm.app currently running. Please quit the\n"
printf " application so your updates won't get overridden on quit.\n\n"
exit 4
fi
SCRIPTDIR=$(cd `dirname $0` && pwd)
# Update git submodules
cd $SCRIPTDIR
git submodule update --init
git submodule foreach checkout master
cd vim-config
git submodule update --init
# Create Links
cd ~
ln -s $SCRIPTDIR/bashrc .bashrc
ln -s $SCRIPTDIR/bashrc.`uname` .bashrc.`uname`
ln -s $SCRIPTDIR/gitconfig .gitconfig
ln -s $SCRIPTDIR/git-global-ignore .git-global-ignore
ln -s $SCRIPTDIR/tigrc .tigrc
ln -s $SCRIPTDIR/vim-config .vim
ln -s $SCRIPTDIR/slate.js .slate.js
ln -s $SCRIPTDIR/zshrc .zshrc
ln -s .vim/vimrc .vimrc
ln -s .vim/gvimrc .gvimrc
cd bin
ln -s $SCRIPTDIR/z/z.sh
if [[ "$1" == "-ooyala" ]] ; then
cd ~
git clone ssh://[email protected]/users/jigish dotfiles-ooyala
./dotfiles-ooyala/config.sh
fi
# Copy iTerm2 Configs
cp $SCRIPTDIR/iterm2-config/com.googlecode.iterm2.plist ~/Library/Preferences/
cd $CURRDIR