-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: bash script to automate the process of building and installing n…
…eovim from source
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
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" |