diff --git a/borg_backup.sh b/borg_backup.sh index f12eccb..a08c7e2 100755 --- a/borg_backup.sh +++ b/borg_backup.sh @@ -1,10 +1,10 @@ -#!/bin/sh +#!/bin/bash ### ### borg_backup.sh ### ### Usage: -### "$0" [-f] +### borg_backup.sh [-f] ### ### Options: ### -f Force an update, even if one was already made today. @@ -16,7 +16,7 @@ print_help() { awk -F'### ' '/^###/ { print $2 }' "$0" } -cache_file='/home/flyingscorpio/.cache/borg_backup_hook_last_executed' +cache_file="$HOME/.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 diff --git a/pacman_hooks/borg_backup.hook b/pacman_hooks/borg_backup.hook index 38ffb19..cb34793 100644 --- a/pacman_hooks/borg_backup.hook +++ b/pacman_hooks/borg_backup.hook @@ -6,7 +6,7 @@ Type = Package Target = * [Action] -Description = Update to lime2 +Description = Borg backup When = PreTransaction -Exec = /bin/sh /home/flyingscorpio/SetupCockpit/borg_backup.sh +Exec = /home/flyingscorpio/SetupCockpit/borg_backup.sh Depends = borg