summaryrefslogtreecommitdiff
path: root/bin/backup
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2021-12-02 15:26:02 +0100
committerMarc Vertes <mvertes@free.fr>2021-12-02 15:26:02 +0100
commitea345acc22fbb3a0ac36a7d1ea43de3dae0f51a1 (patch)
tree0d66397562ff673cf7eeff25e38ac81e35310e25 /bin/backup
parentde9baa2ddebf828e57809cdb41dddc3ee56cb29e (diff)
update
Diffstat (limited to 'bin/backup')
-rwxr-xr-xbin/backup2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/backup b/bin/backup
index adce78d..9de097f 100755
--- a/bin/backup
+++ b/bin/backup
@@ -3,7 +3,7 @@
backup() {
date=$(date +%Y%m%d_%H%M%S)
- last=$(rsync --list-only "$dest/" 2>/dev/null | cut -b 47- | tail -1)
+ last=$(rsync --list-only "$dest/" 2>/dev/null | awk '{r=$NF} END {print r}')
case $last in
([12]*) opt_link=--link-dest=../$last;;