summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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;;