From 403aed266aaff46afabe987a7632a1c54baddb8d Mon Sep 17 00:00:00 2001 From: infidel Date: Thu, 7 Jul 2022 00:34:16 +0700 Subject: [PATCH] Now the installation script will detect if .vim dir in home is exist if so, the script will move the old .vim and then proceed with symlink --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index 2feb43d..e336878 100755 --- a/install.sh +++ b/install.sh @@ -34,8 +34,17 @@ vim_extension () { user_install () { echo "VIM Conf" + ln -sf $(pwd)/.vimrc /home/$(whoami)/ + + if [ -d "$HOME/.vim" ] ; then + echo -e "\tExisting .vim directory detected..." + mv "$HOME/.vim" "$HOME/.vim.bak" + read -p "...." + fi + ln -sf $(pwd)/.vim/ /home/$(whoami)/ + vim_extension