-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
executable file
·61 lines (53 loc) · 1.56 KB
/
deploy.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
#!/bin/bash
# Configuration script for :
# - vim / neovim
# - st (suckless terminal)
# - tmux
# Prerequiries:
# - Install neovim / vim with true colors
# - Install tmux
# - Install zsh
#ln -s dotfiles/.shellrc $HOME/.shellrc
#ln -s dotfiles/.inputrc $HOME/.inputrc
#ln -s dotfiles/.tmux.conf $HOME/.tmux.conf
#ln -s dotfiles/.vimrc $HOME/.vimrc
#echo '. $HOME/.shellrc' >> $HOME/.zshrc
function config_neovim {
# Neovim symbolic link config file
mkdir -p $HOME/.config/nvim
ln -s $PWD/.vimrc $HOME/.config/nvim/init.vim
# Vim-plug for Neovim
curl -fLo $HOME/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
#cat << EOF >> $HOME/.shellrc
# ZSH
#vim() {
#tput smkx # Fix delete key in neovim for the time being. See https://github.com/neovim/neovim/issues/3211
#command nvim \$@
#}
#EOF
}
function config_vim {
# Vim-plug for Vim
curl -fLo $HOME/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
}
function install_ohmyzsh {
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
}
while true; do
read -p "Do you use neovim? (Answer no if you use vim)" yn
case $yn in
[Yy]* ) config_neovim; break;;
[Nn]* ) config_vim;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Do you wish to install oh-my-zsh?" yn
case $yn in
[Yy]* ) install_ohmyzsh; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done