#!/bin/sh
MANDIR=debian
mkdir -p $MANDIR

VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`

export PATH=${PATH}:bin

for program in `ls bin/prokka{,-bio*,-c*,-g*,-h*,-u*}`
do
help2man --no-info --no-discard-stderr \
         --name='rapid annotation of prokaryotic genomes' \
            --version-string="$VERSION" ${program} > $MANDIR/${program}.1
done
cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

