From ab91b0587c2dc8574ae8bef39136090e107b2fb1 Mon Sep 17 00:00:00 2001 From: lilei Date: Fri, 9 Aug 2019 04:42:53 -0400 Subject: [PATCH] install: add install.sh --- install.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..31cbcdc --- /dev/null +++ b/install.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cd $(dirname $0) + +if [ -f /etc/vim/vimrc ] && [ ! -f /etc/vim/vimrc.bak]; then + mv /etc/vim/vimrc /etc/vim/vimrc.bak + touch /etc/vim/vimrc +fi + +if [ -f /etc/vimrc ] && [ ! -f /etc/vimrc.bak]; then + mv /etc/vimrc /etc/vimrc.bak + touch /etc/vimrc +fi + +rm -rf /root/.vim >/dev/null 2>&1 +rm -f /root/.vimrc >/dev/null 2>&1 +cp -rf vim /root/.vim +cp -f vimrc /root/.vimrc + +echo -e "\033[32m- Install successfully...\033[0m" +exit 0