Vorrei andare per qualcosa del genere:
set -eu ## Stop on errors and on undefined variables
## The local directory name
## The remote directory in rsync sintax. Example: "machine:directory"
# 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"
$ cd svn
$ rsyncmeld myproject othermachine:myproject -v --exclude '*.svn' --exclude build