#!/bin/sh

make README.scanners README.services

if [ "$1" = "home" ]; then
  TARGET='home.salstar.sk:sh/sagator'
else
  TARGET='sal:public_html/pub/antivir/sagator'
  EXTRA_EXCLUDE="--exclude=rsync"
fi

rsync -v \
 --archive \
 --recursive \
 --links \
 --perms \
 --times \
 --delete \
 --stats --progress \
 -e 'ssh' \
 --exclude='DEADJOE' \
 --exclude='root/tmp/*' \
 --exclude='config.py' \
 --exclude='*.pyc' --exclude='*.pyo' \
 --exclude='*~' \
 --exclude='CVS*' \
 --exclude='*.o' --exclude='*.so' \
 $EXTRA_EXCLUDE \
 . "$TARGET"

if [ ! "$1" = "noco" ]; then
  cvs commit -m "$1"
fi
