X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fsrsync-incremental;h=aa2c977c056a2898c7ad0c7ac90acd947c6c202f;hb=0b60017e21b2b4d2253d1b3dc2d97341db0555e4;hp=62ab0d6e76cf0b2f4ac065693e1d0bff666806eb;hpb=b461c7e7165cf9e403a4d0dbeba79dfa0bbc968d;p=config%2Fdotfiles.git 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'`