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