40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z $_config_loaded ] ; then
|
|
echo "No config loaded - loading '../config.sh'"
|
|
. ../config.sh
|
|
fi
|
|
|
|
set -e
|
|
|
|
if ! command -v yarn ; then
|
|
echo 'nvim.sh: Error - dependency `yarn` not installed'
|
|
exit 5
|
|
fi
|
|
|
|
if command -v apt-get ; then
|
|
apt-get -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip python-pip python3-pip golang
|
|
cd /tmp
|
|
git clone https://github.com/neovim/neovim
|
|
cd neovim
|
|
make CMAKE_BUILD_TYPE=Release
|
|
mkdir -p /usr/local/share/nvim
|
|
mv /tmp/neovim/runtime /usr/local/share/nvim/runtime
|
|
mv /tmp/neovim/build/bin/nvim /usr/local/bin/nvim
|
|
else
|
|
echo 'Error - no package installer found.'
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p /home/"$_user"/.config
|
|
cd /home/"$_user"
|
|
rm -Rf .config/nvim
|
|
su "$_user" -c 'git clone https://git."$_user"elliott.dev/dots/nvim.git .config/nvim'
|
|
|
|
su "$_user" --login -c 'yarn global add neovim'
|
|
|
|
su "$_user" --login -c 'python2 -m pip install --user --upgrade pynvim'
|
|
su "$_user" --login -c 'python3 -m pip install --user --upgrade pynvim'
|
|
|
|
su "$_user" --login -c 'nvim --headless +PlugInstall +qall'
|