-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy_install.sh
executable file
·52 lines (46 loc) · 1.27 KB
/
easy_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
#!/bin/bash
# Go to your home directory
cd ~
# Backup your existing vim, zsh and tmux configs if they already exist
files="
.vim
.zshrc
.vimrc
.tmux.conf
"
for f in $files
do
if [[ -f $f || -d $f ]]
then
mv $f "$f".old
echo "$f moved to $f.old"
else
echo "$f does not exist"
fi
done
# Check if you have brew installed and install vim, tmux, python (for powerline),
# reattach-to-user-namespace (for tmux), z and ag (the_silver_searcher for vim's ctrlp plugin)
if type "brew" > /dev/null
then
brew update
brew install vim --override-system-vi tmux python reattach-to-user-namespace z ag
pip install psutil
pip install powerline-status
else
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Check that you have robby russell's excellent oh-my-zsh
if [ $(echo $ZSH) != $(echo $HOME/.oh-my-zsh) ]
then
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
# Hide dotfiles folder if it has not been made correctly from installation step 1
if [[ -d "dotfiles" ]]
then
mv dotfiles .dotfiles
fi
# Create symlinks for your new configuration
ln -s .dotfiles/tmux.conf .tmux.conf &&
ln -s .dotfiles/vimrc .vimrc &&
ln -s .dotfiles/vim .vim &&
ln -s .dotfiles/zshrc .zshrc