#!/usr/bin/env bash set -euxo pipefail packages=( cargo go neovim npm python-pip python-pynvim ripgrep ) echo -e "\033[0;32m>>>>> Begin LVim installation <<<<<\033[0m" {{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}} ## Update system {{- if ne .chezmoi.username "root" }} sudo pacman -Syu --noconfirm {{- else }} pacman -Syu --noconfirm {{- end}} ## 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 {{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}} export 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}} ## Install packages packages=(${packages[@]//go/golang}) packages=(${packages[@]//python/python3}) packages=(${packages[@]//neovim/}) for package in ${packages[@]}; do echo "installing ${package}..." {{- if ne .chezmoi.username "root" }} sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package {{- else }} apt-get install --yes --no-install-recommends --ignore-missing $package {{- end }} done mist install neovim {{- end }} 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"