Yo iría por algo como esto:
#! /bin/bash
set -eu ## Stop on errors and on undefined variables
## The local directory name
LOCAL_DIR=$1
## The remote directory in rsync sintax. Example: "machine:directory"
REMOTE_DIR=$2
shift
shift
# Now the first two args are gone and any other remaining arguments, if any,
# can be expanded with $* or $@
# Create temporary file in THIS directory (hopefully in the same disk as $1:
# we need to hard link, which can only made in the same partition)
tmpd="$(mktemp -d "$PWD/XXXXXXX.tmp" )"
# Upon exit, remove temporary directory, both on error and on success
trap 'rm -rf "$tmpd"' EXIT
# Make a *hard-linked* copy of our repository. It uses very little space
# and is very quick
cp -al "$LOCAL_DIR" "$tmpd"
# Copy the files. The final «"$@"» allows us to pass on arguments for rsync
# from the command line (after the two directories).
rsync -a "$REMOTE_DIR"/ "$tmpd/" --size-only "$@"
# Compare both trees
meld "$LOCAL_DIR" "$tmpd"
Por ejemplo:
$ cd svn
$ rsyncmeld myproject othermachine:myproject -v --exclude '*.svn' --exclude build
Raúl Salinas-Monteagudo
fuente
--dry-rundependerá de su uso de-vy--progress options, por lo tanto, si no obtiene ninguna salida, verifique que estas opciones estén configuradas según sea necesario. Me di cuenta de que enviará nombres de directorio incluso cuando los archivos no hayan cambiado, pero puede filtrarlos pasando la salida a través desedo similar.