Skip to content

Instantly share code, notes, and snippets.

@kuator
Last active August 2, 2022 03:27
Show Gist options
  • Save kuator/197e8800e3201f3dc81ef9623d3017b6 to your computer and use it in GitHub Desktop.
Save kuator/197e8800e3201f3dc81ef9623d3017b6 to your computer and use it in GitHub Desktop.
Neovim build script
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