dotfiles/run_after_update_packagelis...

20 lines
465 B
Cheetah
Raw Normal View History

#!/bin/bash
# packages.yaml hash: {{ include ".chezmoidata/packages.yaml" | sha256sum }}
# Generate the list of installed brew packages
brews=$(brew list --formula | awk '{print " - "$1}')
# Generate the list of installed cask packages
casks=$(brew list --cask | awk '{print " - "$1}')
# Print the output in the desired format
cat <<EOF > {{ .chezmoi.sourceDir }}/.chezmoidata/packages.yaml
packages:
darwin:
brews:
$brews
casks:
$casks
EOF