From 78a0304823f9ec185ce7762813c135bfa00081f6 Mon Sep 17 00:00:00 2001 From: Hanabishi <13597663+HanabishiRecca@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:24:44 +0500 Subject: [PATCH] Keep backups when moving old directory --- caches-manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caches-manager b/caches-manager index 141261d..8021e58 100755 --- a/caches-manager +++ b/caches-manager @@ -30,7 +30,7 @@ create_cache() { fi elif [ -e "${dir}" ]; then echo -n "target exists, backing up... " - mv -fT "${dir}" "${dir}.bak" + mv -fT --backup=numbered "${dir}" "${dir}.bak" fi if ln -sfT "$1" "${dir}"; then