Skip to content

Instantly share code, notes, and snippets.

@lambdalisue
Last active February 28, 2022 07:43
Show Gist options
  • Save lambdalisue/f4e5be194da954ef10f9f4eb72b70bed to your computer and use it in GitHub Desktop.
Save lambdalisue/f4e5be194da954ef10f9f4eb72b70bed to your computer and use it in GitHub Desktop.
Install "nvim" on Ubuntu/Debian
#!/bin/bash
#######################################################################
# Install "nvim" on Ubuntu/Debian
#
# Author: lambdalisue
# License: MIt
#
#######################################################################
if ! which porg >/dev/null 2>&1; then
echo 'A program manager "porg" is required.'
echo 'Install it via the following command'
echo ''
echo ' curl -sL git.io/vXTo7 | bash'
echo ''
echo 'Ref: https://gist.github.com/lambdalisue/161aa84af9a9ff7d3bfe9decfabf656a'
exit 1
fi
set -e
unset rep
atexit() {
[[ -d "$rep" ]] && rm -rf $rep
}
trap atexit HUP INT QUIT TERM
sudo apt-get install -y libtool autoconf automake cmake g++ pkg-config unzip
# Latest Ubuntu/Debian also require 'libtool-bin'
set +e
sudo apt install -y libtool-bin > /dev/null 2>&1
set -e
rep=$(realpath $(mktemp -d nvim.XXXXXX))
# Clone the neovim repository
git clone --depth 1 --single-branch https://github.com/neovim/neovim $rep
cd $rep
make deps
make CMAKE_BUILD_TYPE=Releas -j $(grep -c '^processor' /proc/cpuinfo)
sudo porg -lp 'neovim' 'make install'
atexit
@lambdalisue
Copy link
Author

lambdalisue commented Oct 28, 2016

https://git.io/vXToq

$ curl -sL git.io/vXToq | bash

@Oukanina
Copy link

Thanks!

@BenceBakos
Copy link

Porg installer you link in error message, did not worked for me, but the following did:

apt install porg

Also, i had to run it in

sudo -i

mode to avoid Permission issues.

Note here: this mode is not suggested as it's running every command in root, read throug any script you run like this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment