Move scripts to own folder

This commit is contained in:
aloslider
2026-04-15 20:37:39 +03:00
parent 86581557d7
commit d5cdf5c34d
3 changed files with 0 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
set -euo pipefail
SRC_DIR="${HOME}/apps/neovim"
BIN_DIR="${HOME}/.local"
BUILD_TYPE="Debug"
BRANCH="master"
if [[ -x "${BIN_DIR}/bin/nvim" ]]; then
echo "Neovim already installed at ${BIN_DIR}"
exit 0
fi
echo "Installing neovim from source"
echo "Target folder: ${SRC_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 "${SRC_DIR}/src" ]]; then
cd "${SRC_DIR}/src"
git fetch --all --prune
git checkout "${BRANCH}"
git pull
else
git clone https://github.com/neovim/neovim.git "${SRC_DIR}/src"
cd "${SRC_DIR}/src"
git checkout "${BRANCH}"
fi
rm -rf ${SRC_DIR}/build
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${BIN_DIR}"
make install