2020-03-19 21:28:44 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-03-19 21:57:10 +00:00
|
|
|
if ! command -v yarn ; then
|
|
|
|
echo 'nvim.sh: Error - dependency `yarn` not installed'
|
|
|
|
exit 5
|
|
|
|
fi
|
|
|
|
|
2020-03-19 21:28:44 +00:00
|
|
|
if command -v apt-get ; then
|
2020-03-20 14:17:49 +00:00
|
|
|
apt-get -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip golang
|
2020-03-19 21:28:44 +00:00
|
|
|
cd /tmp
|
|
|
|
git clone https://github.com/neovim/neovim
|
|
|
|
cd neovim
|
|
|
|
make CMAKE_BUILD_TYPE=Release
|
2020-03-20 14:17:49 +00:00
|
|
|
mkdir -p /usr/local/share/nvim
|
|
|
|
mv /tmp/neovim/runtime /usr/local/share/nvim/runtime
|
2020-03-19 21:28:44 +00:00
|
|
|
mv /tmp/neovim/build/bin/nvim /usr/local/bin/nvim
|
|
|
|
else
|
2020-03-20 20:06:14 +00:00
|
|
|
echo 'Error - no package installer found.'
|
2020-03-19 21:28:44 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p /home/"$_user"/.config
|
|
|
|
cd /home/"$_user"
|
|
|
|
rm -Rf .config/nvim
|
2020-03-20 14:18:56 +00:00
|
|
|
su "$_user" -c 'git clone https://git."$_user"elliott.dev/dots/nvim.git .config/nvim'
|
2020-03-19 21:28:44 +00:00
|
|
|
|
2020-03-20 14:18:56 +00:00
|
|
|
su "$_user" --login -c 'yarn global add neovim'
|
2020-03-20 14:17:49 +00:00
|
|
|
|
2020-03-20 14:18:56 +00:00
|
|
|
su "$_user" --login -c 'python2 -m pip install --user --upgrade pynvim'
|
|
|
|
su "$_user" --login -c 'python3 -m pip install --user --upgrade pynvim'
|
2020-03-20 14:17:49 +00:00
|
|
|
|
2020-03-20 14:18:56 +00:00
|
|
|
su "$_user" --login -c 'nvim --headless +PlugInstall +qall'
|