shoestrap/recipes/no-sudo/build-vim

35 lines
758 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
2023-02-24 22:36:47 +00:00
set -e
2023-02-24 22:36:47 +00:00
function main() {
local vim_dir="$WORKSPACE/vim"
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
2023-02-24 22:36:47 +00:00
# Go to workspace
cd "$vim_dir"
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"
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)}"
2023-02-24 22:36:47 +00:00
# Go back to previous directory
cd "$ROOT_DIR"
}