#!/usr/bin/bash

# You can run and install with
# curl https://jased.xyz/scripts/neovim_quickbuld.sh | bash

# get deps
echo " - Installing deps"
sudo apt-get install ninja-build gettext cmake unzip curl build-essential
#sudo apk add ninja-build gettext cmake unzip curl build-base

# get the repo
echo " - Cloning git repo"
git clone https://github.com/neovim/neovim
cd neovim

# set up build type
echo " - Setting build type and selecting stable"
git checkout stable
make CMAKE_BUILD_TYPE=RelWithDebInfo

# make .deb
echo " - Making and installing .deb"
cd build
cpack -G DEB
sudo dpkg -i nvim-linux64.deb
