#!/bin/bash
#
# pusher.sh - shell script to watch the data directory on c1.chess.cornell.edu
#             and push any new data files that show up there up to the
#             destination account and directory shown below.
#

destination_account=prod@gluey.phys.uconn.edu
destination_dir=/home/www/docs/halld/diamonds/chess-6-2012/data/latest/

if [ $# != 0 ]; then
  echo "Usage: pusher.sh"
  exit 1
fi

while true; do
  echo doing rsync -ave ssh . $destination_account:$destination_dir
  rsync -ave ssh . $destination_account:$destination_dir
  echo sleeping...
  sleep 10;
done
