-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
54 lines (42 loc) · 1.15 KB
/
install.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
#!/usr/bin/env bash
set -o errexit
set -o nounset
readonly dir=$(cd $(dirname "$0"); pwd)
function backup_old_configuration() {
if [ ! -d "old_dotfiles" ]
then
mkdir old_dotfiles
fi
local files=".vimrc .zshrc .gitconfig .gitignore_global"
for file in $files; do
if [ -f "$file" ]
then
cp $file old_dotfiles/
fi
done
}
echo "== Backing up old configuration (if any) =="
backup_old_configuration
echo ""
echo "== Loading /brew/install.sh =="
bash $dir/brew/install.sh
echo ""
echo "== Setting to zsh and installing oh-my-zsh =="
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
function symlink_oh_my_zsh() {
if [ -d ~/.oh-my-zsh ]
then
rm -rf ~/.oh-my-zsh/custom
ln -s $dir/zsh/custom ~/.oh-my-zsh/custom
fi
}
echo "== Symlinking oh-my-zsh aliases =="
symlink_oh_my_zsh
ln -s $dir/slate ~/.slate
ln -s $dir/gitconfig ~/.gitconfig
ln -s $dir/gitconfig_global ~/.gitconfig_global
ln -s $dir/karabiner.json ~/.karabiner.json
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
ln -s $dir/vim/colors .vim/colors
ln -s $dir/vim/vimrc .vimrc
vim +PluginInstall +qall