diff options
Diffstat (limited to 'scripts/lib_backup.sh')
| -rw-r--r-- | scripts/lib_backup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib_backup.sh b/scripts/lib_backup.sh index b6f54f6a..5abcf0eb 100644 --- a/scripts/lib_backup.sh +++ b/scripts/lib_backup.sh @@ -30,12 +30,12 @@ backup_dir() { mv "$dir" "${dir}-backup-${backup_suffix}" 2>&1 | tee -a "$log" } -# Cleanup old backups under ~/.config, keeping the newest for each base dir. +# Cleanup old backups under ${XDG_CONFIG_HOME:-$HOME/.config}, keeping the newest for each base dir. # mode: "auto" (no prompts) or "prompt" (asks before delete); log optional. cleanup_backups() { local mode="${1:-prompt}" local log="${2:-/dev/null}" - local CONFIG_DIR="$HOME/.config" + local CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" local BACKUP_PREFIX="-backup" for DIR in "$CONFIG_DIR"/*; do |
