Update file run_onchange_after_12-install-packages.tmpl

This commit is contained in:
Brian Zalewski 2022-12-25 11:20:08 +00:00
parent d37f97e548
commit e090c084d1

View file

@ -3,8 +3,9 @@
{{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
{{- $softwareGroup := nospace (cat "_" .host.softwareGroup) }} {{- $softwareGroup := nospace (cat "_" .host.softwareGroup) }}
{{- $softwareList := list (index .softwareGroups $softwareGroup | toString | replace "[" "" | replace "]" "") | uniq | join " " }}
# software: {{ index .softwareGroups $softwareGroup | toString | replace "[" "" | replace "]" "" }} # software: {{ $softwareList }}
# software map: {{ include (joinPath .chezmoi.homeDir ".local" "share" "chezmoi" "software.yml") | sha256sum }} # software map: {{ include (joinPath .chezmoi.homeDir ".local" "share" "chezmoi" "software.yml") | sha256sum }}
if command -v install-program > /dev/null; then if command -v install-program > /dev/null; then
@ -14,7 +15,7 @@ if command -v install-program > /dev/null; then
# Ask for the administrator password upfront # Ask for the administrator password upfront
logg info 'A sudo password may be required for some of the installations' logg info 'A sudo password may be required for some of the installations'
sudo echo "Sudo access granted." sudo echo "Sudo access granted."
install-program {{ index .softwareGroups $softwareGroup | toString | replace "[" "" | replace "]" "" }} install-program {{ $softwareList }}
else else
logg error '`zx` is not available' logg error '`zx` is not available'
fi fi