diff --git a/recipes/default/build-neovim b/recipes/default/build-neovim index 0faee3d..f5b27e9 100644 --- a/recipes/default/build-neovim +++ b/recipes/default/build-neovim @@ -28,7 +28,7 @@ if [ ! -d $neovim_dir ]; then log "Cloning neovim" git clone https://github.com/neovim/neovim $neovim_dir else - (cd $neovim_dir && git pull) + (cd $neovim_dir && git fetch) fi -(cd $neovim_dir && make && sudo make install) +(cd $neovim_dir && git checkout stable && make && sudo make install) diff --git a/recipes/default/build-vim b/recipes/default/build-vim index e73e4e3..5c612f6 100644 --- a/recipes/default/build-vim +++ b/recipes/default/build-vim @@ -10,28 +10,30 @@ fi # Build latest vim if [ ! -d $vim_dir ]; then - hg clone https://vim.googlecode.com/ $vim_dir + log "Cloning vim" + git clone https://github.com/vim/vim.git $vim_dir +else + (cd $vim_dir && git fetch) fi -# Go to workspace -cd $vim_dir +function conf_build_and_install() { + # Get latest tagged source code + latest_tag=`git describe --tags` + git checkout $latest_tag -# 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 + # 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 + # 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)