2015-11-03 23:04:57 +00:00
|
|
|
#!/bin/bash
|
2023-02-24 22:36:47 +00:00
|
|
|
set -e
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
function main() {
|
|
|
|
local vim_dir="$WORKSPACE/vim"
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
# Build latest vim
|
|
|
|
if [ ! -d "$vim_dir" ]; then
|
|
|
|
hg clone https://vim.googlecode.com/ "$vim_dir"
|
|
|
|
fi
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
# Go to workspace
|
|
|
|
cd "$vim_dir"
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
# 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 \
|
|
|
|
--prefix="$LOCAL_PREFIX"
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
# Compile
|
|
|
|
make
|
|
|
|
# Install newly compiled vim
|
|
|
|
make install
|
|
|
|
# Link vi to vim out of convenience
|
|
|
|
vim_path=$(which vim)
|
|
|
|
sudo ln -s "$vim_path" "${vim_path:0:(-1)}"
|
2015-11-03 23:04:57 +00:00
|
|
|
|
2023-02-24 22:36:47 +00:00
|
|
|
# Go back to previous directory
|
|
|
|
cd "$ROOT_DIR"
|
|
|
|
}
|