#!/bin/sh

whom=$1
manualsrpm=$2
automaticsrpm=$3

. autorepo-config
sed -e "s,@ALT_SRPM@,${manualsrpm},g;s,@AUTO_SRPM@,${automaticsrpm},g;s,@AUTOREPO_ADMIN_MAIL@,${AUTOREPO_ADMIN_MAIL},g;s,@GB_REPO_NAME@,${GB_REPO_NAME},g;s,@AUTOREPO_BRANCH@,${AUTOREPO_BRANCH},g;" /usr/share/autorepo-scripts/templates/message-purge.template > "$AUTOREPO_HOME/message-purge"
mutt -x -s "$GB_REPO_NAME: the package you uploaded to incoming is not greater" -i "$AUTOREPO_HOME/message-purge" "${whom}@altlinux.org" </dev/null
rm -f "$AUTOREPO_HOME/message-purge"
