#!/bin/bash if [ $# -eq 0 ]; then dest=magic.merlins.org elif [ $# -eq 1 ]; then dest=$1 else echo "$0 targetmachine" exit fi if test -z $SSH_AUTH_SOCK; then ssh-agent bash -c "ssh-add; $0 $dest" exit fi rsync -avSH -P --fuzzy --delete --delete-after /var/www/PrivPix/{rig-options,albums} $dest:/var/www/PrivPix/ rsync -avSH -P --fuzzy /var/www/PrivPix/rig-cache/. $dest:/var/www/PrivPix/rig-cache/