Up.
This commit is contained in:
parent
2187fcf99f
commit
066ff6c2f7
@ -2,9 +2,12 @@
|
||||
|
||||
# Logging function
|
||||
log() {
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)" "$1"
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
inf() {
|
||||
printf "$(tput setaf 2)$(tput sgr 0 1)%s$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
|
||||
# Packages to install
|
||||
@ -25,6 +28,7 @@ packages=(
|
||||
log ">>>>> Begin Arch/Manjaro Linux packages installation <<<<<"
|
||||
|
||||
## Update system
|
||||
inf "updating system..."
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo pacman -Syu --noconfirm
|
||||
{{- else }}
|
||||
@ -33,7 +37,7 @@ packages=(
|
||||
|
||||
## Install yay
|
||||
if [ ! $(command -v yay) ]; then
|
||||
log "installing yay"
|
||||
inf "installing yay..."
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo pacman -S --needed --noconfirm git base-devel
|
||||
{{- else}}
|
||||
@ -48,7 +52,7 @@ packages=(
|
||||
## Install packages
|
||||
for package in ${packages[@]}; do
|
||||
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
yay -S --noconfirm $package
|
||||
fi
|
||||
done
|
||||
@ -62,6 +66,7 @@ packages=(
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## Add repositories and update system
|
||||
inf "updating system..."
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing lsb-release gpg
|
||||
curl -fsSL 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
|
||||
@ -99,7 +104,7 @@ packages=(
|
||||
)
|
||||
|
||||
for package in ${packages[@]}; do
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
# Logging function
|
||||
log() {
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)" "$1"
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
inf() {
|
||||
printf "$(tput setaf 2)$(tput sgr 0 1)%s$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
|
||||
@ -23,10 +27,14 @@ log ">>>>> Begin Zsh installation <<<<<"
|
||||
|
||||
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
|
||||
|
||||
## Update system
|
||||
inf "updating system..."
|
||||
yay -Syu --noconfirm
|
||||
|
||||
## install packages
|
||||
for package in ${packages[@]}; do
|
||||
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
yay -S --noconfirm $package
|
||||
fi
|
||||
done
|
||||
@ -34,11 +42,21 @@ log ">>>>> Begin Zsh installation <<<<<"
|
||||
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## Update system
|
||||
inf "updating system..."
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt update
|
||||
sudo -E apt upgrade --yes
|
||||
{{- else }}
|
||||
apt update
|
||||
apt upgrade --yes
|
||||
{{- end}}
|
||||
|
||||
packages=(${packages[@]//starship/})
|
||||
|
||||
## install packages
|
||||
for package in ${packages[@]}; do
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
|
||||
@ -47,7 +65,7 @@ log ">>>>> Begin Zsh installation <<<<<"
|
||||
{{- end }}
|
||||
done
|
||||
|
||||
log "installing starship..."
|
||||
inf "installing starship..."
|
||||
mist install starship-bin
|
||||
|
||||
{{- end }}
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
# Logging function
|
||||
log() {
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)" "$1"
|
||||
printf "$(tput setaf 4)$(tput bold)>>>>> %s <<<<<$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
inf() {
|
||||
printf "$(tput setaf 2)$(tput sgr 0 1)%s$(tput sgr0)\n" "$1"
|
||||
}
|
||||
|
||||
|
||||
@ -25,12 +29,13 @@ log ">>>>> Begin LVim installation <<<<<"
|
||||
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
|
||||
|
||||
## Update system
|
||||
inf "updating system..."
|
||||
yay -Syu --noconfirm
|
||||
|
||||
## Install packages
|
||||
for package in ${packages[@]}; do
|
||||
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
yay -S --noconfirm $package
|
||||
fi
|
||||
done
|
||||
@ -40,6 +45,7 @@ log ">>>>> Begin LVim installation <<<<<"
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## Update system
|
||||
inf "updating system..."
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt update
|
||||
sudo -E apt upgrade --yes
|
||||
@ -54,7 +60,7 @@ log ">>>>> Begin LVim installation <<<<<"
|
||||
packages=(${packages[@]//neovim/})
|
||||
|
||||
for package in ${packages[@]}; do
|
||||
log "installing ${package}..."
|
||||
inf "installing ${package}..."
|
||||
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
|
||||
@ -63,12 +69,12 @@ log ">>>>> Begin LVim installation <<<<<"
|
||||
{{- end }}
|
||||
done
|
||||
|
||||
log "installing neovim..."
|
||||
inf "installing neovim..."
|
||||
mist install neovim
|
||||
|
||||
{{- end }}
|
||||
|
||||
log "installing lvim..."
|
||||
inf "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')
|
||||
|
||||
log ">>>>> Finish LVim installation <<<<<"
|
||||
|
Loading…
Reference in New Issue
Block a user