dotfiles/.chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl
2025-04-23 21:13:45 +08:00

16 lines
424 B
Cheetah

{{ if eq .chezmoi.os "darwin" -}}
#!/bin/sh
# Install Homebrew
command -v brew >/dev/null 2>&1 || \
(echo '🍺 Installing Homebrew' && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)")
brew bundle --file=/dev/stdin <<EOF
{{ range .packages.darwin.brews -}}
brew {{ . | quote }}
{{ end -}}
{{ range .packages.darwin.casks -}}
cask {{ . | quote }}
{{ end -}}
EOF
{{ end -}}