1
0
chezmoi/home/.chezmoiscripts/run_onchange_after_80-install-lvim.sh.tmpl

74 lines
1.5 KiB
Cheetah
Raw Normal View History

2024-01-20 21:50:27 +00:00
#!/usr/bin/env bash
2024-02-28 20:38:45 +00:00
# Load local library
. ./common.lib
2024-01-20 21:50:27 +00:00
2024-02-28 20:38:45 +00:00
packages=(
cargo
go
neovim
npm
python-pip
python-pynvim
ripgrep
)
info1 ">>>>> Begin LVim installation <<<<<"
2024-01-20 21:55:48 +00:00
2024-02-26 22:12:51 +00:00
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
2024-01-20 21:50:27 +00:00
2024-02-28 20:38:45 +00:00
## Update system
yay -Syu --noconfirm
2024-02-26 22:12:51 +00:00
## Install packages
2024-02-28 20:38:45 +00:00
for package in ${packages[@]}; do
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
info2 "installing ${package}..."
yay -S --noconfirm $package
fi
done
2024-02-26 22:12:51 +00:00
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
2024-02-28 20:38:45 +00:00
DEBIAN_FRONTEND=noninteractive
## Update system
{{- if ne .chezmoi.username "root" }}
sudo -E apt update
sudo -E apt upgrade --yes
{{- else }}
apt update
apt upgrade --yes
{{- end}}
2024-02-27 15:39:55 +00:00
2024-02-26 22:12:51 +00:00
## Install packages
2024-02-28 20:38:45 +00:00
packages=(${packages[@]//go/golang})
packages=(${packages[@]//python/python3})
packages=(${packages[@]//neovim/})
for package in ${packages[@]}; do
info2 "installing ${package}..."
2024-02-27 15:18:56 +00:00
{{- if ne .chezmoi.username "root" }}
2024-02-28 20:38:45 +00:00
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
{{- else }}
apt-get install --yes --no-install-recommends --ignore-missing $package
2024-02-27 15:18:56 +00:00
{{- end }}
2024-02-28 20:38:45 +00:00
done
2024-02-26 22:12:51 +00:00
2024-02-28 20:38:45 +00:00
info2 "installing neovim..."
mist install neovim
2024-02-27 14:06:11 +00:00
2024-02-26 22:12:51 +00:00
{{- end }}
2024-01-06 22:09:43 +00:00
2024-02-28 20:38:45 +00:00
info2 "installing lvim..."
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')
2024-01-20 21:55:48 +00:00
2024-02-28 20:38:45 +00:00
info1 ">>>>> Finish LVim installation <<<<<"