dotfiles/script/installvim

29 lines
686 B
Plaintext
Raw Permalink Normal View History

2021-03-31 10:23:59 +00:00
#!/usr/bin/env bash
2021-03-31 10:47:59 +00:00
#
# Clone or update vim to $HOME/dev/vim, build and install to $HOME/local
2021-03-31 10:23:59 +00:00
set -e
mkdir -p $HOME/dev
destdir=$HOME/dev/vim
if [ -d $destdir ]; then
2021-03-31 12:15:08 +00:00
echo "Updating vim..."
2021-03-31 10:23:59 +00:00
cd $destdir
git pull --rebase
else
2021-03-31 12:15:08 +00:00
echo "Cloning vim..."
2021-03-31 10:23:59 +00:00
cd $HOME/dev
git clone -q https://github.com/vim/vim.git vim
fi
2021-03-31 12:15:08 +00:00
cd $destdir
# TODO: https://stackoverflow.com/questions/53135863/macos-mojave-ruby-config-h-file-not-found
opts="--enable-luainterp --enable-python3interp --with-features=huge --enable-multibyte --enable-gui=gtk2"
if [ ! $(uname -s) = "Darwin" ]; then
opts="$opts --with-rubyinterp --with-x"
fi
./configure --prefix=$HOME/local $opts
2021-03-31 10:23:59 +00:00
make -j6
make install