Add neovim install script
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
NVIM_DIR="${HOME}/apps/neovim"
|
||||||
|
BUILD_TYPE="Debug"
|
||||||
|
BRANCH="master"
|
||||||
|
|
||||||
|
echo "Installing neovim from source"
|
||||||
|
echo "Target folder: ${NVIM_DIR}"
|
||||||
|
echo "Branch: ${BRANCH}"
|
||||||
|
echo "Build type: ${BUILD_TYPE}"
|
||||||
|
|
||||||
|
{{ if eq .chezmoi.osRelease.idLike "arch" }}
|
||||||
|
sudo pacman -S --noconfirm --needed base-devel cmake ninja curl git
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
mkdir -p "${HOME}/apps"
|
||||||
|
|
||||||
|
if [[ -d "${NVIM_DIR}/src" ]]; then
|
||||||
|
cd "${NVIM_DIR}/src"
|
||||||
|
git fetch --all --prune
|
||||||
|
git checkout "${BRANCH}"
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
git clone https://github.com/neovim/neovim.git "${NVIM_DIR}/src"
|
||||||
|
cd "${NVIM_DIR}/src"
|
||||||
|
git checkout "${BRANCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -r build/
|
||||||
|
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${NVIM_DIR}"
|
||||||
|
make install
|
||||||
Reference in New Issue
Block a user