2024-05-07 21:17:46 +00:00
|
|
|
#!{{ lookPath "bash" }}
|
2024-01-20 21:50:27 +00:00
|
|
|
|
2024-03-01 10:26:26 +00:00
|
|
|
# Logging function
|
|
|
|
log() {
|
2024-03-01 10:47:05 +00:00
|
|
|
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
inf() {
|
2024-03-03 14:12:40 +00:00
|
|
|
printf "$(tput setaf 2)╚═══ᐳ $(tput sgr 0 1)$(tput setaf 2)%s$(tput sgr0)\n" "$1"
|
2024-03-01 10:26:26 +00:00
|
|
|
}
|
2024-02-28 20:38:45 +00:00
|
|
|
|
|
|
|
|
2024-03-01 10:26:26 +00:00
|
|
|
|
|
|
|
# Packages to install
|
2024-02-28 20:38:45 +00:00
|
|
|
packages=(
|
|
|
|
neovim
|
|
|
|
python-pip
|
|
|
|
python-pynvim
|
|
|
|
ripgrep
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-01 11:02:30 +00:00
|
|
|
log "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
|
2024-03-01 10:47:05 +00:00
|
|
|
inf "updating system..."
|
2024-04-10 22:04:33 +00:00
|
|
|
yay -Syu --noconfirm --removemake --quiet
|
2024-02-28 20:38:45 +00:00
|
|
|
|
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
|
2024-03-01 10:47:05 +00:00
|
|
|
inf "installing ${package}..."
|
2024-04-10 22:04:33 +00:00
|
|
|
yay -S --noconfirm --removemake --quiet $package
|
2024-02-28 20:38:45 +00:00
|
|
|
fi
|
|
|
|
done
|
2024-02-26 22:12:51 +00:00
|
|
|
|
|
|
|
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
|
|
|
|
|
2024-03-01 11:46:05 +00:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2024-02-28 20:38:45 +00:00
|
|
|
|
|
|
|
## Update system
|
2024-03-01 10:47:05 +00:00
|
|
|
inf "updating system..."
|
2024-02-28 20:38:45 +00:00
|
|
|
{{- if ne .chezmoi.username "root" }}
|
2024-03-01 11:02:30 +00:00
|
|
|
sudo -E apt update -qq
|
|
|
|
sudo -E apt upgrade --yes -qq
|
2024-02-28 20:38:45 +00:00
|
|
|
{{- else }}
|
2024-03-01 11:02:30 +00:00
|
|
|
apt update -qq
|
|
|
|
apt upgrade --yes -qq
|
2024-02-28 20:38:45 +00:00
|
|
|
{{- end}}
|
2024-02-27 15:39:55 +00:00
|
|
|
|
2024-02-26 22:12:51 +00:00
|
|
|
## Install packages
|
2024-03-01 13:29:31 +00:00
|
|
|
## packages[1]=golang
|
2024-03-01 11:42:37 +00:00
|
|
|
packages=(${packages[@]/python/python3})
|
|
|
|
packages=(${packages[@]/neovim/})
|
2024-03-01 11:56:45 +00:00
|
|
|
packages+=(python3-venv)
|
2024-02-28 20:38:45 +00:00
|
|
|
|
|
|
|
for package in ${packages[@]}; do
|
2024-03-01 10:47:05 +00:00
|
|
|
inf "installing ${package}..."
|
2024-02-28 20:38:45 +00:00
|
|
|
|
2024-02-27 15:18:56 +00:00
|
|
|
{{- if ne .chezmoi.username "root" }}
|
2024-03-01 12:39:14 +00:00
|
|
|
sudo -E apt-get install --yes --no-install-recommends --ignore-missing --fix-broken -qq $package
|
2024-02-28 20:38:45 +00:00
|
|
|
{{- else }}
|
2024-03-01 12:39:14 +00:00
|
|
|
apt-get install --yes --no-install-recommends --ignore-missing --fix-broken -qq $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-03-01 10:47:05 +00:00
|
|
|
inf "installing neovim..."
|
2024-02-28 20:38:45 +00:00
|
|
|
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-03-01 10:47:05 +00:00
|
|
|
inf "installing lvim..."
|
2024-02-22 20:11:39 +00:00
|
|
|
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-03-01 11:02:30 +00:00
|
|
|
log "Finish LVim installation"
|
2024-02-28 20:38:45 +00:00
|
|
|
|
|
|
|
|