Skip to content

Commit

Permalink
install: add install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lilei committed Aug 9, 2019
1 parent bfd96cf commit ab91b05
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ab91b05

Please sign in to comment.