1
0
This commit is contained in:
Jeff Lance 2024-03-01 11:26:26 +01:00
parent 68c7297f7e
commit 65552b0dc4
3 changed files with 52 additions and 29 deletions

View File

@ -1,10 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Load local library # Logging function
. ./run_before-common.lib log() {
printf "${C_BLU}>>>>> %s <<<<<${F_RST}" "$1"
}
# Testing existance function
exist() {
command -v "$1$" >/dev/null 2>&1
}
# Packages to install
packages=( packages=(
curl curl
direnv direnv
@ -19,7 +26,7 @@ packages=(
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}} {{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
info1 ">>>>> Begin Arch/Manjaro Linux packages installation <<<<<" log ">>>>> Begin Arch/Manjaro Linux packages installation <<<<<"
## Update system ## Update system
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
@ -29,8 +36,8 @@ packages=(
{{- end}} {{- end}}
## Install yay ## Install yay
if [ ! $(command -v yay) ]; then if [ ! exist "yay" ]; then
info2 "installing yay" log "installing yay"
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
sudo pacman -S --needed --noconfirm git base-devel sudo pacman -S --needed --noconfirm git base-devel
{{- else}} {{- else}}
@ -45,16 +52,16 @@ packages=(
## Install packages ## Install packages
for package in ${packages[@]}; do for package in ${packages[@]}; do
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
info2 "installing ${package}..." log "installing ${package}..."
yay -S --noconfirm $package yay -S --noconfirm $package
fi fi
done done
info1 ">>>>> Finish Arch/Manjaro Linux packages installation <<<<<" log ">>>>> Finish Arch/Manjaro Linux packages installation <<<<<"
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}} {{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
info1 ">>>>> Begin Debian/Ubuntu Linux packages installation <<<<<" log ">>>>> Begin Debian/Ubuntu Linux packages installation <<<<<"
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
@ -96,7 +103,7 @@ packages=(
) )
for package in ${packages[@]}; do for package in ${packages[@]}; do
info2 "installing ${package}..." log "installing ${package}..."
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
@ -105,7 +112,7 @@ packages=(
{{- end }} {{- end }}
done done
info1 ">>>>> Finish Debian/Ubuntu Linux packages installation <<<<<" log ">>>>> Finish Debian/Ubuntu Linux packages installation <<<<<"
{{- end }} {{- end }}

View File

@ -1,14 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Load local library # Logging function
. ./run_before-common.lib log() {
printf "${C_BLU}>>>>> %s <<<<<${F_RST}" "$1"
}
# Testing existance function
exist() {
command -v "$1$" >/dev/null 2>&1
}
ZIMDIR=${HOME}/.zim ZIMDIR=${HOME}/.zim:
# Packages to install
packages=( packages=(
starship starship
zsh zsh
@ -17,14 +25,14 @@ packages=(
### Install Zsh ### ### Install Zsh ###
info1 ">>>>> Begin Zsh installation <<<<<" log ">>>>> Begin Zsh installation <<<<<"
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}} {{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
## install packages ## install packages
for package in ${packages[@]}; do for package in ${packages[@]}; do
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
info2 "installing ${package}..." log "installing ${package}..."
yay -S --noconfirm $package yay -S --noconfirm $package
fi fi
done done
@ -36,7 +44,7 @@ info1 ">>>>> Begin Zsh installation <<<<<"
## install packages ## install packages
for package in ${packages[@]}; do for package in ${packages[@]}; do
info2 "installing ${package}..." log "installing ${package}..."
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
@ -45,18 +53,18 @@ info1 ">>>>> Begin Zsh installation <<<<<"
{{- end }} {{- end }}
done done
info2 "installing starship..." log "installing starship..."
mist install starship-bin mist install starship-bin
{{- end }} {{- end }}
info1 ">>>>> Finish Zsh installation <<<<<" log ">>>>> Finish Zsh installation <<<<<"
### Config Zsh ### ### Config Zsh ###
info1 ">>>>> Installing Zim Framework <<<<<" log ">>>>> Installing Zim Framework <<<<<"
$(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q" $(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q"
info1 ">>>>> Finish zsh installation <<<<<" log ">>>>> Finish zsh installation <<<<<"

View File

@ -1,10 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Load local library # Logging function
. ./run_before-common.lib log() {
printf "${C_BLU}>>>>> %s <<<<<${F_RST}" "$1"
}
# Testing existance function
exist() {
command -v "$1$" >/dev/null 2>&1
}
# Packages to install
packages=( packages=(
cargo cargo
go go
@ -17,7 +25,7 @@ packages=(
info1 ">>>>> Begin LVim installation <<<<<" log ">>>>> Begin LVim installation <<<<<"
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}} {{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
@ -27,7 +35,7 @@ info1 ">>>>> Begin LVim installation <<<<<"
## Install packages ## Install packages
for package in ${packages[@]}; do for package in ${packages[@]}; do
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
info2 "installing ${package}..." log "installing ${package}..."
yay -S --noconfirm $package yay -S --noconfirm $package
fi fi
done done
@ -51,7 +59,7 @@ info1 ">>>>> Begin LVim installation <<<<<"
packages=(${packages[@]//neovim/}) packages=(${packages[@]//neovim/})
for package in ${packages[@]}; do for package in ${packages[@]}; do
info2 "installing ${package}..." log "installing ${package}..."
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
@ -60,14 +68,14 @@ info1 ">>>>> Begin LVim installation <<<<<"
{{- end }} {{- end }}
done done
info2 "installing neovim..." log "installing neovim..."
mist install neovim mist install neovim
{{- end }} {{- end }}
info2 "installing lvim..." log "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') 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')
info1 ">>>>> Finish LVim installation <<<<<" log ">>>>> Finish LVim installation <<<<<"