shoestrap/recipes/default/build-vim

40 lines
893 B
Plaintext
Raw Normal View History

2013-08-08 03:23:13 +00:00
#!/bin/bash
local vim_dir="$WORKSPACE/vim"
# Get the build dependencies
if [ "$PACKAGE_MANAGER" == 'apt-get' ]; then
sudo apt-get build-dep vim vim-gtk
fi
# TODO: Add pacman support
# Build latest vim
if [ ! -d $vim_dir ]; then
2019-11-02 00:42:14 +00:00
log "Cloning vim"
git clone https://github.com/vim/vim.git $vim_dir
else
(cd $vim_dir && git fetch)
2013-08-08 03:23:13 +00:00
fi
2019-11-02 00:42:14 +00:00
function conf_build_and_install() {
# Get latest tagged source code
latest_tag=`git describe --tags`
git checkout $latest_tag
# Configure vim with ruby, python and GTK
./configure --with-features=huge \
--enable-pythoninterp \
--enable-rubyinterp \
--enable-gui=gtk2
# Compile
make
# Install newly compiled vim
sudo make install
# Link vi to vim out of convenience
vim_path=$(which vim)
sudo ln -s $vim_path ${vim_path:0:(-1)}
}
(cd $vim_dir && conf_build_and_install)