dotfiles/script/installnvim

21 lines
446 B
Plaintext
Raw Permalink Normal View History

2021-06-22 04:24:37 +00:00
#!/usr/bin/env bash
#
# Clone or update nvim to $HOME/dev/neovim, build and install to $HOME/local
set -e
2023-10-07 08:43:32 +00:00
mkdir -p "$HOME/dev"
2021-06-22 04:24:37 +00:00
destdir=$HOME/dev/neovim
2023-10-07 08:43:32 +00:00
if [ -d "$destdir" ]; then
2021-06-22 04:24:37 +00:00
echo "Updating nvim..."
2023-10-07 08:43:32 +00:00
cd "$destdir"
2021-06-22 04:24:37 +00:00
git pull --rebase
else
echo "Cloning nvim..."
2023-10-07 08:43:32 +00:00
cd "$HOME/dev"
2021-06-22 04:24:37 +00:00
git clone -q https://github.com/neovim/neovim.git neovim
2023-10-07 08:43:32 +00:00
cd "$destdir"
2021-06-22 04:24:37 +00:00
fi
2023-10-07 08:43:32 +00:00
make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX="$HOME/local"
2021-06-22 04:24:37 +00:00
make install