52 lines
1.3 KiB
Bash
52 lines
1.3 KiB
Bash
#!/usr/bin/env sh
|
|
|
|
# .chezmoidata/packages.yaml hash: {{ include ".chezmoidata/packages.yaml" | sha256sum }}
|
|
|
|
echo "[-] Updating packages [-]"
|
|
|
|
{{- if eq .chezmoi.os "linux" }}
|
|
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
|
echo "[-] Updating APK packages [-]"
|
|
apk update
|
|
{{ range .packages.linux.apks -}}
|
|
apk add {{ . | quote }}
|
|
{{ end -}}
|
|
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
|
|
{{ range .packages.linux.dnfs -}}
|
|
sudo dnf install -y {{ . | quote }}
|
|
{{ end -}}
|
|
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
|
echo "[-] Updating Apt packages [-]"
|
|
sudo apt update
|
|
{{ range .packages.linux.apts -}}
|
|
sudo apt install -y {{ . | quote }}
|
|
{{ end -}}
|
|
{{ end -}}
|
|
|
|
{{- else if eq .osid "darwin" }}
|
|
echo "[-] Updating brews [-]"
|
|
{{ range .packages.darwin.brews -}}
|
|
/opt/homebrew/bin/brew install {{ . | quote }}
|
|
{{ end -}}
|
|
{{ end -}}
|
|
|
|
echo "[-] Updating Webman groups [-]"
|
|
|
|
if test -x ~/.webman/bin/webman; then
|
|
echo "webman already installed"
|
|
else
|
|
echo "\n[-] Installing webman [-]"
|
|
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
|
|
fi
|
|
|
|
~/.webman/bin/webman upgrade webman
|
|
|
|
{{ range .packages.webman.groups -}}
|
|
~/.webman/bin/webman group upgrade {{ . | quote }} -a
|
|
{{ end -}}
|
|
|
|
echo "[-] Updating Webman packages [-]"
|
|
{{ range .packages.webman.pkgs -}}
|
|
~/.webman/bin/webman upgrade {{ . | quote }}
|
|
{{ end -}}
|