-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·52 lines (45 loc) · 1.27 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
#!/usr/bin/sh
prep_git() {
mv ~/.gitconfig ~/.gitconfig.bak 2>/dev/null ||:
ln -s ~/dotfiles/git/.gitconfig ~/
ln -s ~/dotfiles/git/.gitconfig.personal ~/
}
prep_tmux() {
mv ~/.tmux.conf ~/.tmux.conf.bak 2>/dev/null ||:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
ln -s ~/dotfiles/tmux/.tmux.conf ~/
~/.tmux/plugins/tpm/bin/install_plugins
}
prep_vim_plugins() {
rm -rf ~/.vim/bundle
mkdir -p ~/.vim/autoload ~/.vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
}
prep_vim() {
mv ~/.vimrc ~/.vimrc.bak 2>/dev/null ||:
mv ~/.ctrlpignore ~/.ctrlpignore.bak ||:
ln -s ~/dotfiles/vim/.vimrc ~/
ln -s ~/dotfiles/vim/.ctrlpignore ~/
}
install_zsh() {
if command -v apt >/dev/null; then
apt install zsh -y
elif command -v yum >/dev/null; then
yum install zsh -y
else
echo "No idea how to install zsh..."
fi
}
prep_zsh() {
if ! command -v zsh >/dev/null; then
install_zsh
fi
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
mv ~/.zshrc ~/.zshrc.bak 2>/dev/null
ln -s ~/dotfiles/zsh/.zshrc ~/
}
prep_git
prep_vim
prep_zsh
prep_tmux