Last active
February 28, 2022 07:43
-
-
Save lambdalisue/f4e5be194da954ef10f9f4eb72b70bed to your computer and use it in GitHub Desktop.
Install "nvim" on Ubuntu/Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Thanks!
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
https://git.io/vXToq