2024-06-04 17:44:27 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-06-04 17:51:38 +02:00
|
|
|
# packages.yaml hash: {{ include ".chezmoidata/packages.yaml" | sha256sum }}
|
|
|
|
|
2024-06-04 17:44:27 +02:00
|
|
|
# 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
|
2024-06-04 17:51:38 +02:00
|
|
|
cat <<EOF > {{ .chezmoi.sourceDir }}/.chezmoidata/packages.yaml
|
2024-06-04 17:44:27 +02:00
|
|
|
packages:
|
|
|
|
darwin:
|
|
|
|
brews:
|
|
|
|
$brews
|
|
|
|
casks:
|
|
|
|
$casks
|
2024-06-04 17:51:38 +02:00
|
|
|
EOF
|