#!/usr/bin/env bash
remote="chrisblog@netsoj.nl:"
notremote="."
# z = compress
# r = recursive (I don't want to keep owner and such)
# P = progress + partial
# t = preserve modification times
# h = show human readable numbers
# X = preserve extended attributes
# --exclude mijnblog = don't send that huge binary over thousands of times.
flags="-brzPthX --exclude mijnblog --exclude .git --suffix .old --stats"

case $1 in
	"pull")
		shift
		rsync $flags $@ $remote $notremote;;
	"push")
		shift
		rsync $flags $@ $notremote $remote;;
	*)
		echo "usage: $0 [push|pull] <arguments to rsync...>";;
esac
