diff --git a/arch-desktop_borg.sh b/arch-desktop_borg.sh index 27326a8..e9e7c9e 100755 --- a/arch-desktop_borg.sh +++ b/arch-desktop_borg.sh @@ -16,10 +16,10 @@ print_help() { awk -F'### ' '/^###/ { print $2 }' "$0" } +cache_file='/home/flyingscorpio/.cache/borg_backup_hook_last_executed' stat_cache_file() { # We only want this file to be executed at most once per day, so we stat a cache # file before running the rest of the code - cache_file='/home/flyingscorpio/.cache/borg_backup_hook_last_executed' if [ -f "$cache_file" ]; then cache_stat=$(stat -c %y "$cache_file" | cut -d' ' -f1) today=$(date +%Y-%m-%d)