2022-12-01 22:08:12 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-12-25 01:09:00 -08:00
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
2022-12-01 22:08:12 -08:00
|
|
|
|
|
|
|
{{ $fontFiles := (output "find" (joinPath .chezmoi.homeDir ".local" "share" "fonts") "-type" "f") -}}
|
|
|
|
{{- range $fontFile := splitList "\n" $fontFiles -}}
|
|
|
|
{{- if ne $fontFile "" -}}
|
|
|
|
# {{ $fontFile }} hash: {{ $fontFile | sha256sum }}
|
|
|
|
{{ end -}}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
### Ensure all fonts are added to ~/Library/Fonts on macOS
|
|
|
|
find "$HOME/.local/share/fonts" -type f | while read FONT_FILE; do
|
|
|
|
BASENAME="$(basename "$FONT_FILE")"
|
|
|
|
if [ ! -f "$HOME/Library/Fonts/$BASENAME" ] || [ "$(openssl sha256 "$HOME/Library/Fonts/$BASENAME" | sed 's/.*= //')" != "$(openssl sha256 "$FONT_FILE" | sed 's/.*= //')" ]; then
|
Update .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_10_install-aqua-packages.sh.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_5-install-homebrew.tmpl, .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_8-install-zx.tmpl, .local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_before_10-install-windows-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_before_11-install-windows-packages.tmpl, .local/share/chezmoi/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl, .local/share/chezmoi/home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl, .local/share/chezmoi/home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_set-wallpaper.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-ensure-zsh-macos.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-macos.tmpl, .local/share/chezmoi/home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl, .local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl, .local/share/chezmoi/home/Library/Fonts/run_onchange_after_add-fonts.tmpl
2022-12-01 23:18:16 -08:00
|
|
|
logg info 'Adding '"$BASENAME"' to ~/Library/Fonts'
|
2022-12-01 22:08:12 -08:00
|
|
|
cp "$FONT_FILE" "$HOME/Library/Fonts/$BASENAME"
|
|
|
|
fi
|
|
|
|
done
|