#!/bin/sh

if [ -n "$1" ] ; then
    DIR="$1"
else 
    DIR="."
fi

rm -f $DIR/wordlist.db
bogoutil -d $DIR/goodlist.db | awk '{print $1 " " 0 " " $2 " " $3}' | tee goodlist.txt | bogoutil -l $DIR/wordlist.db
bogoutil -d $DIR/spamlist.db | awk '{print $1 " " $2 " " 0 " " $3}' | tee spamlist.txt | bogoutil -l $DIR/wordlist.db
bogoutil -d $DIR/wordlist.db > wordlist.txt
