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

View File

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