#!/bin/sh
#
# syncit -- transfer files between systems using rsync
#
# Note that files in rsyncExcl will not be deleted
# 
# Add the -n option for no-effect experiments
#
# This script uses rcp syntax for source and destination, e.g.,
#    syncit workstation:paperDir/ laptop:paperDir
# updates all files in paperDir on laptop from versions in workstation. 
# Default is current machine, so on laptop I'd run
#    syncit workstation:paperDir/ paperDir
# The option --delete also removes files that aren't in the source dir. 
# When in doubt, use -n which lists the files that would be updated but 
# doesn't actually do the update. 
#
# Note re scp:
# scp -rp recursively copies subdirectories and preserves modif dates etc
# 
# AUTHOR: Gary T. Leavens from an original script by David Naumann

[ -n "$echo" ] && set -x

USAGE="$0"'[options] from-dir to-dir
Remember to use a slash on from-dir, e.g., '"$0"' --delete guinness:rool/ rool'

export RSYNC_RSH=ssh

exec rsync -S --rsync-path=/usr/bin/rsync -aup "$@"



