diff options
-rwxr-xr-x | bin/backup | 36 |
1 files changed, 8 insertions, 28 deletions
@@ -92,31 +92,11 @@ shift $((OPTIND - 1)) ARCHIVE_TAG="${1:-manual}" -run() { - STATUS=0 - set -x - # The contents of $VERBOSE_FLAGS doesn't involve user input: - # shellcheck disable=2086 - nicely borg create \ - $VERBOSE_FLAGS \ - --comment "$COMMENT" \ - --exclude "$XDG_CACHE_HOME" \ - --exclude ~/Downloads/ \ - --exclude ~/mnt/ \ - --stats \ - --compression lzma,9 \ - "::{hostname}-{now}-$ARCHIVE_TAG" \ - ~/ || STATUS=$? - set +x - - if [ "$STATUS" = 0 ]; then - return 0 - elif [ "$STATUS" = 1 ]; then - printf 'WARNING, but no ERROR.\n' >&2 - return 0 - else - return "$STATUS" - fi -} - -run +set -x +# The contents of $VERBOSE_FLAGS doesn't involve user input: +# shellcheck disable=2086 +borgy \ + $VERBOSE_FLAGS \ + --comment "$COMMENT" \ + "::{hostname}-{now}-$ARCHIVE_TAG" \ + ~/ |