Last active
December 8, 2023 09:27
-
-
Save ferdinandkeller/14f54c2ff3d8837c6801bb1cbf340d00 to your computer and use it in GitHub Desktop.
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 | |
# rhel-only stuff | |
function rhel_setup () { | |
# we install EPEL and CRB | |
sudo dnf install -y epel-release | |
sudo dnf config-manager --set-enabled crb | |
# we install the packages needed to build the latest nvim version (for ubuntu) | |
sudo dnf -y install ninja-build cmake gcc make unzip gettext curl | |
# continue with instructions common to both distros | |
global_install | |
} | |
# debian only stuff | |
function debian_setup () { | |
# we install the packages needed to build the latest nvim version (for ubuntu) | |
sudo apt update | |
sudo apt install -y ninja-build gettext cmake unzip curl git | |
# continue with instructions common to both distros | |
global_install | |
} | |
# actual installayion | |
function global_install () { | |
# we clone the nvim repo | |
git clone https://github.com/neovim/neovim.git | |
# we move to the repo, and select the stable branch | |
cd ./neovim | |
git checkout stable | |
# build and install the editor | |
make CMAKE_BUILD_TYPE=Release | |
sudo make install | |
# once done, we remove the repository | |
cd .. | |
rm -rf ./neovim | |
# clone the nvchad configuration | |
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 | |
} | |
# install on rhel-like distros | |
if [ -f /etc/redhat-release ]; then | |
rhel_setup | |
# install on debian-like distros | |
elif [ -f /etc/lsb-release ]; then | |
debian_setup | |
else | |
echo "your distro doesn't seem to be supported yet" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install script (needs
sudo
,curl
andbash
preinstalled):