shoestrap/recipes/default/build-neovim
2023-02-24 14:36:51 -08:00

36 lines
893 B
Bash
Executable File

#! /bin/bash
set -e
# in common
# sudo_package 'libtool automake cmake'
case "$PACKAGE_MANAGER" in
"port")
sudo_package 'libtool autoconf automake cmake pkgconfig gettext ninja'
;;
"brew")
sudo_package 'libtool automake cmake pkg-config gettext ninja'
;;
"apt-get")
sudo_package 'libtool libtool-bin autoconf automake cmake g++ pkg-config unzip ninja-build'
# Ensure python support is in nvim
sudo_package 'python-dev python-pip python3-dev python3-pip'
;;
esac
sudo pip install neovim
if command_exist pip3 ; then
sudo pip3 install neovim
fi
neovim_dir="$WORKSPACE/neovim"
if [ ! -d "$neovim_dir" ]; then
log "Cloning neovim"
git clone https://github.com/neovim/neovim "$neovim_dir"
else
(cd "$neovim_dir" && git fetch)
fi
(cd "$neovim_dir" && git checkout stable && make && sudo make install)