Created
September 23, 2013 07:47
-
-
Save shenyubao/6667574 to your computer and use it in GitHub Desktop.
Vim 7.4 Install script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# By Shenyubao <[email protected]> | |
VIM_VERSION=$(vim --version | grep IMproved | awk '{print $5}') | |
if [ $VIM_VERSION = "7.4" ];then | |
echo "this is already vim 7.4" | |
exit; | |
fi | |
confirm() { | |
echo "Press RETURN to install vim7.4 , or ^C to cancel."; | |
read -e ignored | |
} | |
if [ ! -d ~/vimsrc ];then | |
mkdir ~/vimsrc | |
fi | |
cd ~/vimsrc | |
if [ ! -d ~/vimsrc/vim74 ];then | |
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 | |
tar -xvf vim-7.4.tar.bz2 | |
fi | |
cd vim74 | |
./configure --enable-multibyte \--with-features=huge \--disable-selinux | |
make && make install | |
if [[ $? -ne 0 ]];then | |
echo "Fail in install. Plase Check the script" | |
fi | |
mv /usr/bin/vim /usr/bin/vim.bac | |
ln -s /usr/local/bin/vim /usr/bin/vim | |
rm -rf ~/vimsrc | |
echo "OK,Install Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment