install.fairie/dotfiles/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_90-install-packages.tmpl

19 lines
666 B
Cheetah
Raw Normal View History

#!/usr/bin/env bash
{{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }}
# software: {{ index .softwareGroups .host.softwareGroup | join " " }}
if command -v install-software > /dev/null; then
if command -v zx > /dev/null; then
logg 'Installing packages defined in .chezmoidata.yaml under the .softwareGroups key'
logg 'Installing: {{ index .softwareGroups .host.softwareGroup | join " " }}'
install-software {{ index .softwareGroups .host.softwareGroup | join " " }}
else
logg error '`zx` is not available'
fi
else
logg error '`install-software` is not in the PATH. It should be located in ~/.local/bin.'
fi