Last active
August 2, 2022 03:27
-
-
Save kuator/197e8800e3201f3dc81ef9623d3017b6 to your computer and use it in GitHub Desktop.
Neovim build script
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
if [ ! -d ~/dev/neovim ] | |
then | |
mkdir -p ~/dev/neovim | |
cd ~/dev/neovim | |
git clone https://github.com/neovim/neovim src | |
fi | |
ROOT_DIR="$HOME/dev/neovim" | |
BUILD_DIR="$ROOT_DIR/build" | |
SOURCE_DIR="$ROOT_DIR/src" | |
# Extract the source and if there were no errors, remove the previous build. | |
cd $SOURCE_DIR | |
git pull && | |
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=$BUILD_DIR && | |
rm -rf $BUILD_DIR && | |
make install && | |
git reset --hard; git clean -fxd && | |
cd - | |
ln -s "$BUILD_DIR/bin/nvim" ~/.local/bin/nvim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment