From 241f62089abe57c2c502ae36642ecafdd4c36bc4 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Sun, 4 Jun 2017 00:32:53 +0200 Subject: [PATCH] Update changelog --- CHANGELOG.md | 1 + scripts/save.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e57a7..9e5368e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - do not create another resurrect file if there are no changes (credit @vburdo) - allow using '$HOSTNAME' in @resurrect-dir - add zsh history saving and restoring +- delete resurrect files older than 30 days, but keep at least 5 files ### v2.4.0, 2015-02-23 - add "tmux-test" diff --git a/scripts/save.sh b/scripts/save.sh index 94df269..0f95982 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -279,7 +279,7 @@ dump_shell_history() { } remove_old_backups() { - # remove backup files older than 30 days, but keep at least 5 copies of backup. + # remove resurrect files older than 30 days, but keep at least 5 copies of backup. local -a files files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6)) [[ ${#files[@]} -eq 0 ]] || find "${files[@]}" -type f -mtime +30 -delete