forked from jigish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.Darwin
executable file
·38 lines (30 loc) · 1.16 KB
/
bootstrap.Darwin
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
#!/bin/bash
SCRIPTDIR=$(cd `dirname $0` && pwd)
# Create Links
cd ~
[[ ! -L .slate.js ]] && ln -s $SCRIPTDIR/slate.js .slate.js
[[ ! -L .xvimrc ]] && ln -s $SCRIPTDIR/xvimrc .xvimrc
[[ ! -L .gvimrc ]] && ln -s .vim/gvimrc .gvimrc
mkdir -p bin
cd bin
[[ ! -L spotify ]] && ln -s $SCRIPTDIR/bin/spotify
[[ ! -L rebrew ]] && ln -s $SCRIPTDIR/bin/rebrew
# set up brew & pip
$SCRIPTDIR/bootstrap.brew
mkdir -p ~/.rubies
[[ ! -d ~/.rubies/2.3.1 ]] && ruby-install --install-dir ${HOME}/.rubies/2.3.1 ruby 2.3.1
cp $SCRIPTDIR/fonts/* ~/Library/Fonts/
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
# Copy iTerm2 Configs
cp $SCRIPTDIR/iterm2-config/com.googlecode.iterm2.plist ~/Library/Preferences/