#!/bin/sh

if [ "x$1" = "x" ]; then
	echo "usage: $0 host"
	exit 1
	fi
pwd=`pwd`
here="$pwd"
#there="$1:$pwd"
there="$1::$pwd"
#opt="-v"

case $(basename $0) in
  download*)
	src="$there"
	dest="$here"
	;;
  upload*)
	src="$here"
	dest="$there"
	;;
  *)
	echo "Unknown action \"$0\""
	exit 1
	;;
esac
case "$0" in
  *test)
	opt="$opt -n"
	;;
  *force)
	opt="$opt -W"
	;;
esac

#rsync -avrtz -e "ssh" --delete --force $opt $src/ $dest
echo rsync -atzv --partial --delete --force $src/ $dest/