1
0

Up config.

This commit is contained in:
Jeff Lance 2024-01-20 22:28:01 +01:00
parent 34585da88e
commit a6be7368f0

View File

@ -1,53 +1,51 @@
{{- if (eq .chezmoi.os "linux") }} #!/usr/bin/env bash
#!/usr/bin/env bash
set -euxo pipefail set -euxo pipefail
packages=( packages=(
curl curl
wget wget
tmux tmux
neovim neovim
) )
{{ if (eq .chezmoi.osRelease.id "manjaro") -}} {{ if (eq .chezmoi.osRelease.id "manjaro") -}}
echo -e "\033[0;32m>>>>> Begin Manjaro Linux packages installation <<<<<\033[0m" echo -e "\033[0;32m>>>>> Begin Manjaro Linux packages installation <<<<<\033[0m"
## Update system ## Update system
{{- if ne .chezmoi.username "root" }} {{- if ne .chezmoi.username "root" }}
sudo pacman -Syu --noconfirm sudo pacman -Syu --noconfirm
{{- else }} {{- else }}
pacman -Syu --noconfirm pacman -Syu --noconfirm
{{- end}} {{- end}}
## Install yay ## Install yay
if [ ! $(command -v yay) ]; then if [ ! $(command -v yay) ]; then
echo "installing yay" echo "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}}
pacman -S --needed --noconfirm git base-devel pacman -S --needed --noconfirm git base-devel
{{- end }} {{- end }}
git clone https://aur.archlinux.org/yay.git /tmp/yay git clone https://aur.archlinux.org/yay.git /tmp/yay
cd /tmp/yay cd /tmp/yay
makepkg -si --noconfirm makepkg -si --noconfirm
rm -rf /tmp/yay rm -rf /tmp/yay
fi
## 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 fi
done
## Install packages echo -e "\033[0;32m>>>>> Finish Manjaro Linux packages installation <<<<<\033[0m"
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
echo -e "\033[0;32m>>>>> Finish Manjaro Linux packages installation <<<<<\033[0m"
{{- end }}
{{- end }} {{- end }}