install.fairie/home/.chezmoiscripts/universal/run_onchange_after_14-timeshift.tmpl
Brian Zalewski 9f775f5e6d Update 6 files
- /home/.chezmoiscripts/universal/run_onchange_after_07-docker-plugins.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-timeshift.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14-keybase.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl
- /software.yml
- /docs/TODO.md
2023-01-30 08:06:59 +00:00

20 lines
699 B
Cheetah

{{- if eq .host.distro.family "linux" -}}
#!/usr/bin/env bash
# timeshift.json hash: {{ include (joinPath .chezmoi.homeDir ".config" "timeshift" "timeshift.json") | sha256sum }}
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
if command -v timeshift > /dev/null; then
logg info 'Ensuring /etc/timeshift is a directory'
sudo mkdir -p /etc/timeshift
TIMESHIFT_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/timeshift/timeshift.json"
logg info "Copying $TIMESHIFT_CONFIG to /etc/timeshift/timeshift.json"
sudo cp -f "$TIMESHIFT_CONFIG" /etc/timeshift/timeshift.json
else
logg info 'The `timeshift` executable is not available'
fi
{{ end -}}