add script to install lazy.nvim
This commit is contained in:
parent
a8398512fd
commit
7c5609dd00
2 changed files with 19 additions and 0 deletions
19
scripts/install_lazy.nvim
Executable file
19
scripts/install_lazy.nvim
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
LAZY_NVIM_SOURCE="https://github.com/folke/lazy.nvim.git"
|
||||
LAZY_NVIM_DESTINATION="${XDG_DATA_HOME}/nvim/lazy/lazy.nvim"
|
||||
LAZY_STATE_DIR="${XDG_STATE_HOME}/nvim/lazy"
|
||||
|
||||
mkdir -p "${LAZY_STATE_DIR}"
|
||||
|
||||
if [ -d "${LAZY_NVIM_DESTINATION}/.git" ]; then
|
||||
echo "INFO: ${LAZY_NVIM_DESTINATION} is already present"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "INFO: Cloning ${LAZY_NVIM_SOURCE} to ${LAZY_NVIM_DESTINATION}..."
|
||||
git clone --filter=blob:none --single-branch "${LAZY_NVIM_SOURCE}" "${LAZY_NVIM_DESTINATION}"
|
Loading…
Reference in a new issue