#!/bin/bash

set -eu

# ../install-package --deb-packages 'libuv1-dev libmsgpack-dev lua-luv-dev libpthread-stubs0-dev'
../install-package --deb-packages '
	autoconf
	automake
	cmake
	curl
	doxygen
	g++
	gettext
	gperf
	libluajit-5.1-dev
	libmsgpack-dev
	libpthread-stubs0-dev
	libtermkey-dev
	libtool
	libtool-bin
	libunibilium-dev
	libutf8proc-dev
	libuv1-dev
	libvterm-dev
	luajit
	lua-luv-dev
	luarocks
	ninja-build
	pkg-config
	unzip
'

sudo luarocks build mpack
sudo luarocks build lpeg
sudo luarocks build inspect

# rm -rf neovim
# git clone https://github.com/neovim/neovim.git
# cd neovim
git checkout 'release-0.8'
mkdir build
cd build || exit 1
make USE_BUNDLED=on -f ../Makefile deps
make USE_BUNDLED=on -f ../Makefile