File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# =================================================================
4- # Restic Backup Script v0.39 - 2025.10.25
4+ # Restic Backup Script v0.40 - 2025.11.18
55# =================================================================
66
77export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
88set -euo pipefail
99umask 077
1010
1111# --- Script Constants ---
12- SCRIPT_VERSION=" 0.39 "
12+ SCRIPT_VERSION=" 0.40 "
1313SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd)
1414PROG_NAME=$( basename " $0 " ) ; readonly PROG_NAME
1515CONFIG_FILE=" ${SCRIPT_DIR} /restic-backup.conf"
@@ -876,8 +876,9 @@ run_preflight_checks() {
876876 fi
877877 for source in " ${BACKUP_SOURCES[@]} " ; do
878878 if [[ " $verbosity " == " verbose" ]]; then printf " %-65s" " Source directory ('$source ')..." ; fi
879- if [ ! -d " $source " ] || [ ! -r " $source " ]; then
880- handle_failure " Source directory not found or not readable: $source " " 13"
879+ # Changed -d (directory) to -e (exists) to allow single file backups (v0.40)
880+ if [ ! -e " $source " ] || [ ! -r " $source " ]; then
881+ handle_failure " Source path not found or not readable: $source " " 13"
881882 fi
882883 if [[ " $verbosity " == " verbose" ]]; then echo -e " [${C_GREEN} OK ${C_RESET} ]" ; fi
883884 done
Original file line number Diff line number Diff line change 1- 6fa38405aef2bdeb4f6418630601ab1d91021c59ddbeea7fcfa219d39cc477c8 restic-backup.sh
1+ 325a6e1ce4492d171827e122f02571e7006d9aefebf7488ef668d3cb63a34d81 restic-backup.sh
You can’t perform that action at this time.
0 commit comments