-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·142 lines (126 loc) · 3.95 KB
/
setup.sh
File metadata and controls
executable file
·142 lines (126 loc) · 3.95 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/bin/sh
basedir=`dirname $0`
if [ "$basedir" = "." ]; then
directory=`pwd`
else
directory="$(pwd)/$basedir"
fi
linux=1
if [ `uname` = 'Darwin' ]; then
linux=0
fi
# This stuff is for when we're in Linux. Everything else is cross platform or OSX specific.
# if [ $linux = 1 ]; then
Install needed stuff
# if [ -z "`which zsh`" ]; then
# sudo apt-get install zsh
# fi
# if [ -z "`which vim`" ]; then
# sudo apt-get install vim
# fi
# if [ -z "`which git`" ]; then
# sudo apt-get install git
# fi
# if [ -z "`which ruby`" ]; then
# sudo apt-get install ruby ruby-dev
# fi
# if [ -z "`which sqlite3`" ]; then
# sudo apt-get install sqlite3 libsqlite3-dev
# fi
# if [ -z "`which curl`" ]; then
# sudo apt-get install curl
# curl=`which curl`
# fi
# if [ -z "`which ctags`" ]; then
# sudo apt-get install ctags
# ctags=`which ctags`
# fi
# if [ -z "`which i3blocks`" ]; then
# sudo apt-get install i3blocks
# fi
# if [ -z "`which rofi`" ]; then
# sudo apt-get install rofi
# fi
# if [ -z "`which nm-applet`" ]; then
# sudo apt-get install nm-applet
# fi
# if [ -z "`which jq`" ]; then
# sudo apt-get install jq
# fi
# if [ -z "`which wget`" ]; then
# sudo apt-get install wget
# fi
# if [ ! -d "$HOME/.config/i3" ]; then
# mkdir -p "$HOME/.config/i3"
# fi
# cp -r ~/dotfiles/linux/i3/* "$HOME/.config/i3"
# if [ ! -d "$HOME/.local/share/fonts" ]; then
# mkdir -p "$HOME/.local/share/fonts"
# fi
# cp ~/dotfiles/linux/*.ttf "$HOME/.local/share/fonts"
# else
# if [ -d "~/Library/Application Support/Sublime Text 2" ]; then
# ln -s ~/dotfiles/SublimeText "~/Library/Application Support/Sublime Text 2/Packages/User"
# fi
# if [ -d "~/Library/Application Support/Sublime Text 3" ]; then
# ln -s ~/dotfiles/SublimeText "~/Library/Application Support/Sublime Text 3/Packages/User"
# fi
# if [ ! -d "$HOME/.atom" ]; then
# mkdir -p "$HOME/.atom"
# cp ~/dotfiles/styles.less "$HOME/.atom"
# fi
# fi
if [ ! -h "$HOME/.vim" ]; then
ln -s "$directory/vim" "$HOME/.vim"
fi
if [ ! -h "$HOME/.vimrc" ]; then
ln -s "$directory/vim/vimrc" "$HOME/.vimrc"
fi
if [ ! -h "$HOME/.gvimrc" ]; then
ln -s "$directory/vim/gvimrc" "$HOME/.gvimrc"
fi
if [ ! -h "$HOME/.ctags" ]; then
rm -f "$HOME/.ctags"
ln -s "$directory/vim/ctags" "$HOME/.ctags"
fi
if [ ! -h "$HOME/.tmux.conf" ]; then
rm -f "$HOME/.tmux.conf"
ln -s "$directory/tmux.conf" "$HOME/.tmux.conf"
fi
if [ ! -h ~/.config/gtk-3.0/gtk.css ]; then
rm -f ~/.config/gtk-3.0/gtk.css
ln -s "$directory/gtk.css" ~/.config/gtk-3.0/gtk.css
fi
# Grab Vundle for Vim
if [ ! -d ~/.vim/bundle/vundle ]; then
mkdir -p ~/.vim/bundle/
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
vim +BundleInstall +qall
fi
# Grab oh-my-zsh
if [ ! -d "$HOME/.oh-my-zsh" ]; then
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
fi
# Solarized dircolors
cp $HOME/dotfiles/dircolors $HOME/.dircolors
# Install my own theme
cp $HOME/dotfiles/dean.zsh-theme $HOME/.oh-my-zsh/themes
# Make the theme active, which involves editing .zshrc
cat $HOME/.zshrc | sed 's/ZSH_THEME=\(.*\)/ZSH_THEME="dean"/' > zshrc
mv zshrc $HOME/.zshrc
# Make sure we have a 256 color term
echo >> $HOME/.zshrc
echo 'TERM="xterm-256color"' >> $HOME/.zshrc
echo 'eval `dircolors ~/.dircolors`' >> $HOME/.zshrc
# git setup
git config --global user.name 'dean'
if [ `hostname` = 'tacos' ]; then
# Work computer, use work e-mail address
git config --global user.email 'dean.jones@pamlabdev.com'
else
git config --global user.email 'dean@deanproxy.com'
fi
git config --global color.ui 'auto'
git config --global push.default simple
git config --global merge.tool opendiff
git config --global core.excludesfile ~/.gitignore