Skip to content

Commit

Permalink
Add: bash script to automate the process of building and installing n…
Browse files Browse the repository at this point in the history
…eovim from source
  • Loading branch information
BPowell76 committed Aug 1, 2024
1 parent 5f75526 commit ffe932a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions build-install-neovim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# This script downloads the nvim source archive based on the version number provided,
# compiles, and installs the newer version for Debian distros.
# Requires cmake

read -p "Enter the Neovim version to download to download: v" nvimVersion
echo -n "Downloading version $nvimVersion"
cd "$HOME/Downloads/"
curl -s -OL "https://github.com/neovim/neovim/archive/refs/tags/v$nvimVersion.tar.gz"
echo "...Done"

echo "Extracting Neovim v$nvimVersion"
tar -xf "v$nvimVersion.tar.gz"

echo "Building Neovim v$nvimVersion Debian Package"
cd "neovim-$nvimVersion"

make -s CMAKE_BUILD_TYPE=Release
cd build
cpack -G DEB

echo "Installing Neovim v$nvimVersion"
sudo dpkg -i nvim-linux64.deb

echo "Neovim v$nvimVersion has been installed"
echo "Do not forget to use 'select-editor' and 'sudo select-editor' if you want to set nvim as your default editor"

0 comments on commit ffe932a

Please sign in to comment.