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

VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktClassifyBLAST
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktGetContigMagnitudes
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktGetLCA
help2man --no-info --no-discard-stderr --help-option="-h" \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from packtGetLibPathkage name or title should be
# different from package short description change this here
progname=ktGetLibPath
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktGetTaxIDFromAcc
help2man --no-info --no-discard-stderr --help-option="-h" \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktGetTaxInfo
help2man --no-info --no-discard-stderr --help-option="-h" \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportBLAST
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportDiskUsage
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportEC
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportFCP
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportGalaxy
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportKrona
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportMETAREP-EC
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT


# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportMGRAST
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportPhymmBL
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportRDP
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportRDPComparison
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportTaxonomy
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportText
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT

# If program name is different from package name or title should be
# different from package short description change this here
progname=ktImportXML
help2man --no-info --no-discard-stderr --help-option=" " \
         --name="$NAME" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1

echo "$MANDIR/*.1" > debian/manpages

cat <<EOT
Please enhance the help2man output.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT