From 627e99a3be4e7852922c5bbe3d951f54753816a0 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Sat, 20 Jan 2024 22:55:48 +0100 Subject: [PATCH] Up config. --- .../run_onchange_80-install-lvim.sh | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/home/.chezmoiscripts/run_onchange_80-install-lvim.sh b/home/.chezmoiscripts/run_onchange_80-install-lvim.sh index b29ae2c..b157bd0 100644 --- a/home/.chezmoiscripts/run_onchange_80-install-lvim.sh +++ b/home/.chezmoiscripts/run_onchange_80-install-lvim.sh @@ -2,14 +2,28 @@ set -euxo pipefail +packages=( + neovim + python-pynvim + npm +) -if [ ! $(command -v nvim) ]; then - {{- if ne .chezmoi.username "root" }} - sudo yay -S --noconfirm neovim python-pynvim - {{- else }} - yay -S --noconfirm neovim python-pynvim - {{- end }} -fi +echo -e "\033[0;32m>>>>> Begin LVim installation <<<<<\033[0m" + +## Install packages +for package in ${packages[@]}; do + if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then + echo "installing packages" + + {{- if ne .chezmoi.username "root" }} + sudo yay -S --noconfirm $package + {{- else }} + yay -S --noconfirm $package + {{- end }} + fi +done LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh) + +echo -e "\033[0;32m>>>>> Finish LVim installation <<<<<\033[0m"