Update install.sh

This commit is contained in:
Smirnov Olexandr 2020-06-25 20:15:29 +03:00
parent bb901e85c2
commit db0801598b

View file

@ -1,59 +1,73 @@
#!/bin/bash #!/bin/bash
read -p "All your git, vim, bash, tmux, zsh settings will be deleted [y/n]: " CONTINUE read -p "Your package manager[1-apt, 2-pacman]: " PACKAGE_MANAGER
if [[ "$CONTINUE" = "y" ]] || [[ "$CONTINUE" = "Y" ]]; then if [[ "$PACKAGE_MANAGER" = "1" ]]; then
rm -rf ~/.vimrc ~/.vim read -p "Install vim config [y/n]: " VIM_CONF
rm -rf ~/.gitconfig ~/.git if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then
rm -rf ~/.bashrc ~/.bash read -p "Install GVim [y/n]:" INS_GVIM
rm -rf ~/.tmux ~/.tmux if [[ "$INS_GVIM" = "y" ]] || [[ "$INS_GVIM" = "Y" ]]; then
rm -rf ~/.zshrc sudo apt-get install -y vim-gui-common
fi
sudo apt-get install vim vim-gui-common curl -y
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
mv vimrc ~/.vimrc
fi; read -p "Install git config [y/n]: " GIT_CONF
if [[ "$GIT_CONF" = "y" ]] || [[ "$GIT_CONF" = "Y" ]] ; then
mv gitconfig ~/.gitconfig
mv gitignore_global ~/.gitignore_global
fi; read -p "Install bash config [y/n]: " BASH_CONF
if [[ "$BASH_CONF" = "y" ]] || [[ "$BASH_CONF" = "Y" ]]; then
sudo apt-get install bash -y
mv bashrc ~/.bashrc
fi; read -p "Intall tmux config [y/n]: " TMUX_CONF
if [[ "$TMUX_CONF" = "y" ]] || [[ "$TMUX_CONF" = "y" ]]; then
sudo apt-get install tmux -y
mv tmux.conf ~/.tmux.conf
mv tmux.conf.local ~/.tmux.conf.local
fi; read -p "Install zsh config [y/n]: " ZSH_CONF
if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then
sudo apt-get install zsh curl git -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv zshrc ~/.zshrc
fi; if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then
clear
echo "vim +source~/.vimrc +PlugInstall"
echo "For install plugins in vim"
fi; if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then
echo "For change shell"
echo "chsh -s $(which zsh)"
fi
fi fi
if [[ "$PACKAGE_MANAGER" = "1" ]]; then
read -p "Install vim config [y/n]: " VIM_CONF read -p "Install vim config [y/n]: " VIM_CONF
if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then
read -p "Install GVim [y/n]:" INS_GVIM sudo pacman -S vim -y
if [[ "$INS_GVIM" = "y" ]] || [[ "$INS_GVIM" = "Y" ]]; then curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
sudo apt-get install -y vim-gui-common mv vimrc ~/.vimrc
fi fi; read -p "Install git config [y/n]: " GIT_CONF
sudo apt-get install vim vim-gui-common curl -y if [[ "$GIT_CONF" = "y" ]] || [[ "$GIT_CONF" = "Y" ]] ; then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim sudo pacman -S git -y
mv vimrc ~/.vimrc mv gitconfig ~/.gitconfig
fi mv gitignore_global ~/.gitignore_global
fi; read -p "Install bash config [y/n]: " BASH_CONF
read -p "Install git config [y/n]: " GIT_CONF if [[ "$BASH_CONF" = "y" ]] || [[ "$BASH_CONF" = "Y" ]]; then
if [[ "$GIT_CONF" = "y" ]] || [[ "$GIT_CONF" = "Y" ]] ; then sudo pacman -S bash -y
mv gitconfig ~/.gitconfig mv bashrc ~/.bashrc
mv gitignore_global ~/.gitignore_global fi; read -p "Intall tmux config [y/n]: " TMUX_CONF
fi if [[ "$TMUX_CONF" = "y" ]] || [[ "$TMUX_CONF" = "y" ]]; then
sudo pacman -S tmux -y
read -p "Install bash config [y/n]: " BASH_CONF mv tmux.conf ~/.tmux.conf
if [[ "$BASH_CONF" = "y" ]] || [[ "$BASH_CONF" = "Y" ]]; then mv tmux.conf.local ~/.tmux.conf.local
sudo apt-get install bash -y fi; read -p "Install zsh config [y/n]: " ZSH_CONF
mv bashrc ~/.bashrc if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then
fi sudo pacman -S zsh curl git -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
read -p "Intall tmux config [y/n]: " TMUX_CONF mv zshrc ~/.zshrc
if [[ "$TMUX_CONF" = "y" ]] || [[ "$TMUX_CONF" = "y" ]]; then fi; if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then
sudo apt-get install tmux -y clear
mv tmux.conf ~/.tmux.conf echo "vim +source~/.vimrc +PlugInstall"
mv tmux.conf.local ~/.tmux.conf.local echo "For install plugins in vim"
fi fi; if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then
echo "For change shell"
read -p "Install zsh config [y/n]: " ZSH_CONF echo "chsh -s $(which zsh)"
if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then fi
sudo apt-get install zsh curl git -y fi
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv zshrc ~/.zshrc
fi
####################
if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then
clear
echo "vim +source~/.vimrc +PlugInstall"
echo "For install plugins in vim"
fi
if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then
echo "For change shell"
echo "chsh -s $(which zsh)"
fi