type rsync >/dev/null 2>&1 || \
{ echo "Patchsync requires rsync, but there's no rsync on your path!" 1>&2; exit 1; }
# If a cp2 is available, use it; otherwise define our own.
type rsync >/dev/null 2>&1 || \
{ echo "Patchsync requires rsync, but there's no rsync on your path!" 1>&2; exit 1; }
# If a cp2 is available, use it; otherwise define our own.
type do_diff >/dev/null 2>&1 || { echo "do_diff is not defined!" 1>&2; exit 1; }
type do_patch >/dev/null 2>&1 || { echo "do_patch is not defined!" 1>&2; exit 1; }
type do_diff >/dev/null 2>&1 || { echo "do_diff is not defined!" 1>&2; exit 1; }
type do_patch >/dev/null 2>&1 || { echo "do_patch is not defined!" 1>&2; exit 1; }
! [ -e "$staging" ] || { echo "Staging dir already exists!" 1>&2; exit 1; }
[ -d "$trunk" ] || { echo "Trunk does not exist!" 1>&2; exit 1; }
! [ -e "$staging" ] || { echo "Staging dir already exists!" 1>&2; exit 1; }
[ -d "$trunk" ] || { echo "Trunk does not exist!" 1>&2; exit 1; }