1
0
chezmoi/home/.chezmoiscripts/run_onchange_after_20-install-shell.sh.tmpl

36 lines
978 B
Cheetah
Raw Normal View History

2024-02-27 20:40:04 +00:00
#!/usr/bin/env bash
set -euxo pipefail
ZIMDIR=${HOME}/.zim
echo -e "\033[0;32m>>>>> Begin Zsh installation <<<<<\033[0m"
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
## Install packages
{{ range .packages_shell.archlinux.yay -}}
echo "installing {{ . | quote }}..."
yay -S --needed --noconfirm {{ . | quote }}
{{ end -}}
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
## Install packages
{{ range .packages_shell.debian.mist -}}
{{- if ne .chezmoi.username "root" }}
sudo -E apt-get install --yes --no-install-recommends --ignore-missing {{ . | quote }}
{{- else}}
apt-get install --yes --no-install-recommends --ignore-missing
{{- end }}
{{ end -}}
{{- end }}
echo -e "\033[0;32m>>>>> Installing Zim Framework <<<<<\033[0m"
$(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q"
echo -e "\033[0;32m>>>>> Finish Zim Framework <<<<<\033[0m"
echo -e "\033[0;32m>>>>> Finish zsh installation <<<<<\033[0m"