forked from douglasjacobsen/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·139 lines (109 loc) · 3.24 KB
/
setup.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
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
#!/usr/bin/env bash
BASH_IT_ADDR="[email protected]:pwolfram/bash-it.git"
VUNDLE_ADDR="[email protected]:gmarik/vundle.git"
if [ -f ~/.vim ]; then
mkdir -p ~/VimBackups
mv ~/.vim ~/VimBackups/.vim
fi
if [ -f ~/.vimrc ]; then
mkdir -p ~/VimBackups
mv ~/.vimrc ~/VimBackups/.vimrc
fi
if [ -f ~/.bashrc ]; then
mkdir -p ~/BashBackups
mv ~/.bashrc ~/BashBackups/.
fi
if [ -f ~/.bash_profile ]; then
mkdir -p ~/BashBackups
mv ~/.bash_profile ~/BashBackups/.
fi
if [ -f ~/.bash_aliases ]; then
mkdir -p ~/BashBackups
mv ~/.bash_aliases ~/BashBackups/.
fi
if [ -f ~/.login ]; then
mkdir -p ~/tcshBackups
mv ~/.login ~/tcshBackups/.
fi
if [ -f ~/.tmux.conf ]; then
mkdir -p ~/tmuxBackup
mv ~/.tmux.conf ~/tmuxBackup/.
fi
if [ -f ~/.screenrc ]; then
mkdir -p ~/screenrcBackup
mv ~/.screenrc ~/screenrcBackup/.
fi
if [ -f ~/.screenrc ]; then
mkdir -p ~/screenrcBackup
mv ~/.screenrc ~/screenrcBackup/.
fi
if [ -f ~/.gitconfig ]; then
mkdir -p ~/gitBackup
mv ~/.gitconfig ~/gitBackup/.
fi
if [ -f ~/.git-completion.bash ]; then
mkdir -p ~/gitBackup
mv ~/.git-completion.bash ~/gitBackup/.
fi
if [ -f ~/.git_core_excludes ]; then
mkdir -p ~/gitBackup
mv ~/.git_core_excludes ~/gitBackup/.
fi
if [ -f ~/.git_template ]; then
mkdir -p ~/.git_template
mv git/hooks ~/.git_template/hooks
fi
git clone ${VUNDLE_ADDR} ~/.vim/bundle/Vundle.vim
git clone ${BASH_IT_ADDR} ~/.bash_it
~/.bash_it/install.sh
ln -sf ${PWD}/bash/.bashrc ~/.bashrc
ln -sf ${PWD}/bash/.bash_profile ~/.bash_profile
ln -sf ${PWD}/bash/.bash_aliases ~/.bash_aliases
ln -sf ${PWD}/tcsh/.login ~/.login
CUSTOM_FILES=`ls bash-it-custom/`
for FILE in ${CUSTOM_FILES}
do
ln -sf ${PWD}/bash-it-custom/${FILE} ~/.bash_it/custom/.
done
source ~/.bashrc
./bash-it-config.sh
ln -s ${PWD}/vim/.vimrc ~/.vimrc
if [ ! -d ~/.vim/bundle/Vundle.vim/spell ]; then
mkdir ~/.vim/bundle/Vundle.vim/spell
fi
if [ ! -d ~/.vim/undodir ]; then
mkdir ~/.vim/undodir
fi
ln -sf ${PWD}/vim/.vimspell.en.utf-8.add ~/.vim/bundle/Vundle.vim/spell/en.utf-8.add
ln -sf ${PWD}/vim/.gvimrc ~/.gvimrc
ln -sf ${PWD}/vim/.vimrc.bundles ~/.vimrc.bundles
ln -sf ${PWD}/tmux/.tmux.conf ~/.tmux.conf
ln -sf ${PWD}/screen/.screenrc ~/.screenrc
if [ ! -d ~/.vim/after/syntax/ ]; then
mkdir -p ~/.vim/after/syntax/
fi
ln -sf ${PWD}/vim/tex.vim ~/.vim/after/syntax/tex.vim
ln -sf ${PWD}/git/.gitconfig ~/.
ln -sf ${PWD}/git/.git-completion.bash ~/.
ln -sf ${PWD}/git/core_excludes ~/.git_core_excludes
ln -sf ${PWD}/pdb/.pdbrc ~/.pdbrc
ln -sf ${PWD}/Xterm/.Xdefaults ~/.Xdefaults
# merge results into default xterm settings
xrdb -merge Xterm/.Xdefaults
xrdb -merge Xterm/solarized
#git config --global core.excludesfile "${PWD}/git/core_excludes"
mkdir -p ~/scripts
cp -R scripts/* ~/scripts/.
#ln ${PWD}/scripts ~/scripts
vim -u ~/.vimrc.bundles +BundleInstall +q
ln -sf ${PWD}/vim/scripts.vim ~/.vim/scripts.vim
###### MAC OSX Specifics ####################
# install osx-trash if on macosx
if [ `uname` == 'Darwin' ]; then
# http://superuser.com/questions/694433/install-gem-for-older-ruby-1-8-on-mac-os-x-10-9-maverics
sudo gem install osx-trash
brew install ack
fi
#if [ `uname` == 'Linux' ]; then
# git clone [email protected]:Homebrew/linuxbrew.git ~/.linuxbrew
#fi