From f2a4799bd9469cef4c0ba7bd55a2d10fa8d421a1 Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Fri, 25 Jun 2021 09:59:20 +0200
Subject: [PATCH] Refactor

---
 backup.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/backup.sh b/backup.sh
index e55feaa..57a63ff 100755
--- a/backup.sh
+++ b/backup.sh
@@ -17,11 +17,10 @@ retrie_on_fail(){
     if [ $1 -ne 0 ]; then
         keep=$(($BK_KEEP_FULL-1))
         if [ $keep -gt 0 ]; then
-            run_duplicity remove-all-inc-of-but-n-full $(($BK_KEEP_FULL-1)) --force
+            run_duplicity remove-all-inc-of-but-n-full $keep --force
         else
             cat <<EOF | lftp $host
             user $user $ftppass
-
             rm -rf $remotedir/*-inc*
             rm -rf $remotedir/*-new-signatures*
 EOF
-- 
GitLab