#!/bin/bash

CWD=`pwd`

if [ $# == 0 ] ; then
    echo first argument must be the file to test, in $CWD
    echo For this, use a pgp signed and encripted e-mail file.
    echo The second arg is optional and is the part to run: 
    echo org, dec, doc, enc. 
    echo Temporary files are in ~/tmp
    echo Mail is not sent
    exit 1
fi

if [ $# == 2 ] ; then
    STEP="--step $2"
fi

DEBG=-d

tmp/bin/binary --relax $DEBG -r frank -m a.pothaar -m f.b.brokken \
         -l /tmp/remailer.log \
        -L 2 -n 1 ${STEP} $CWD/gpg-remailer.rc < $CWD/$1
