#!/bin/sh

rm -f root/tmp/* root/tmp/quarantine/* 2>/dev/null

if [ "$1" = "virtual" ]; then
  TARGET='salstar.sk:sh/magate'
elif [ "$1" = "fnsp" ]; then
  TARGET='fnsp.salstar.sk:sh/magate'
else
  TARGET='sal:public_html/pub/antivir/magate'
  EXTRA_EXCLUDE="--exclude=rsync --exclude=t.py"
fi

rsync -v\
 --archive \
 --recursive \
 --links \
 --perms \
 --times \
 --delete \
 --stats --progress \
 -e 'ssh' \
 --exclude='root/tmp/*' \
 --exclude='*.pyc' \
 --exclude='doc/' \
 --exclude='root/' \
 --exclude='*~' \
 --exclude='test/longfile' \
 $EXTRA_EXCLUDE \
 . "$TARGET"
