shoestrap/recipes/default/build-vim

38 lines
740 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
hg clone https://vim.googlecode.com/ $vim_dir
fi
# Go to workspace
cd $vim_dir
# Use latest tagged source code
hg update -r 'max(tagged())'
# 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)}
# Go back to previous directory
cd $ROOT_DIR