Complete deploy.sh, update vimrc

This commit is contained in:
2019-05-12 14:55:21 +05:30
parent c0cf39e1f0
commit 85f5e482a0
2 changed files with 33 additions and 17 deletions

View File

@@ -1,9 +1,9 @@
#!/usr/bin/env bash
function find_package_manager() {
hash pacman && echo pacman && return 0
hash apt-get && echo apt-get && return 0
hash apk && echo apk && return 0
hash pacman &> /dev/null && echo pacman && return 0
hash apt-get &> /dev/null && echo apt-get && return 0
hash apk &> /dev/null && echo apk && return 0
return 1
}
@@ -13,7 +13,7 @@ function install_package() {
echo -e "\033[38;5;1mCould not find package manager" >&2
exit
fi
case package_manager in
case $package_manager in
pacman)
sudo pacman -S $*
;;
@@ -61,7 +61,33 @@ check_and_install bash
check_and_install tmux
check_and_install vim
check_and_install curl
check_and_install git
echo -e "\n\033[38;5;2mStowing config\n"
mv ~/.bashrc{,.old} &> /dev/null
stow_cfg bash
mv ~/.tmux.conf{,.old} &> /dev/null
mv ~/.tmux{,.old} &> /dev/null
stow_cfg tmux
mv ~/.vimrc{,.old} &> /dev/null
mv ~/.vim{,.old} &> /dev/null
stow_cfg vim
echo -e "\n\033[38;5;2mSetting up wish\n"
mkdir -p ~/.config/
git clone https://gitlab.com/ceda_ei/wish.git ~/.config/wish
echo -e "\n\033[38;5;2mSetting up tmux plugins\n"
mkdir -p ~/.tmux/plugins/
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/bin/install_plugins
echo -e "\n\033[38;5;2mSetting up vim plugins\n"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall +qall
echo -e "\n\033[38;5;2mComplete\n"