From 71bd44e6c82a82f3f0ca868c93217f6c522b5d22 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 29 Aug 2012 18:17:50 +0200 Subject: [PATCH] bin/srsync-incremental: Only match directories when searching for --link-dest. --- bin/srsync-incremental | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/srsync-incremental b/bin/srsync-incremental index 62ab0d6..aa2c977 100755 --- a/bin/srsync-incremental +++ b/bin/srsync-incremental @@ -33,7 +33,8 @@ shift dest=`echo backup-*` if [ "x$dest" != 'xbackup-*' ]; then - dest="`pwd`/`ls -1d backup-* | tail -n1`" + # -F and grep is used to list only directories, zsh's *(/) would be great. + dest="`pwd`/`ls -1dF backup-* | grep / | tail -n1`" fi target=backup-`date '+%Y-%m-%d-%H-%M-%S'` -- 2.45.2