From 156a97ebe409b508c7f5ead36e8aec96fe545f49 Mon Sep 17 00:00:00 2001 From: archibate <1931127624@qq.com> Date: Sat, 2 Apr 2022 13:00:20 +0800 Subject: [PATCH] update install --- release/install.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/release/install.sh b/release/install.sh index 51bede1..2025b50 100755 --- a/release/install.sh +++ b/release/install.sh @@ -53,7 +53,7 @@ install_coc_plugins() { mkdir -p ~/.config/coc/extensions/node_modules/coc-ccls ln -sf node_modules/ws/lib ~/.config/coc/extensions/node_modules/coc-ccls/lib - echo '-- Installation complete' + echo '-- coc plugins installed successfully' } @@ -152,11 +152,20 @@ else ln -sf node_modules/ws/lib ~/.config/coc/extensions/node_modules/coc-ccls/lib EOF echo -n "-- Continue installing from source (y/N)? "; read -n1 x; echo - if [ "x$x" == "xy" ]; then install_any; fi + if [ "x$x" != "xy" ]; then exit 1; fi + install_any fi if [ "x$PWD" != "x$HOME" ]; then - [ -f ~/.vimrc ] && mv ~/.vimrc /tmp/backup.$$.vimrc - [ -d ~/.vim ] && mv ~/.vim /tmp/backup.$$.vim + if [ -f ~/.vimrc ]; then + echo "-- backup existing .vimrc to ~/.vimrc.backup.$$" + mv ~/.vimrc ~/.vimrc.backup.$$ + fi + if [ -d ~/.vim ]; then + echo "-- backup existing .vim to ~/.vim.backup.$$" + mv ~/.vim ~/.vim.backup.$$ + fi + echo "-- installing .vimrc and .vim" cp -r .vimrc .vim ~/ + echo "-- installation complete, thank you for choosing archibate/vimrc" fi