diff options
| author | Laurent Cozic <laurent22@users.noreply.github.com> | 2023-12-17 10:16:28 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-17 10:16:28 +0000 |
| commit | 6664e6c5bc39f787b252bf6811fdad5654457f41 (patch) | |
| tree | 11d9e2277f523f0354b0a8576afdd14162789ac9 | |
| parent | d14cafde7bb41085b3c1063f4bb3430dd128ef1d (diff) | |
Fixed indentation and white space
| -rwxr-xr-x | rsync_tmbackup.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index 02383b4..2101024 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -114,17 +114,17 @@ fn_expire_backups() { continue fi - if [ "$backup_dir" == "$backup_to_keep" ]; then - # this is the latest backup requsted to be kept. We can finish pruning - break - fi + if [ "$backup_dir" == "$backup_to_keep" ]; then + # this is the latest backup requsted to be kept. We can finish pruning + break + fi - if [ "$backup_dir" == "$oldest_backup_to_keep" ]; then - # We dont't want to delete the oldest backup. It becomes first "last kept" backup - last_kept_timestamp=$backup_timestamp - # As we keep it we can skip processing it and go to the next oldest one in the loop - continue - fi + if [ "$backup_dir" == "$oldest_backup_to_keep" ]; then + # We dont't want to delete the oldest backup. It becomes first "last kept" backup + last_kept_timestamp=$backup_timestamp + # As we keep it we can skip processing it and go to the next oldest one in the loop + continue + fi # Find which strategy token applies to this particular backup for strategy_token in $(echo $EXPIRATION_STRATEGY | tr " " "\n" | sort -r -n); do @@ -526,11 +526,11 @@ while : ; do # ----------------------------------------------------------------------------- if [ -n "$PREVIOUS_DEST" ]; then - # regardless of expiry strategy keep backup used for --link-dest - fn_expire_backups "$PREVIOUS_DEST" + # regardless of expiry strategy keep backup used for --link-dest + fn_expire_backups "$PREVIOUS_DEST" else - # keep latest backup - fn_expire_backups "$DEST" + # keep latest backup + fn_expire_backups "$DEST" fi # ----------------------------------------------------------------------------- |
