| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
if [ ! -x /usr/bin/help2man ]; then |
| 6 |
echo "E: Missing /usr/bin/help2man, please install it from the cognate package." |
| 7 |
exit 1 |
| 8 |
fi |
| 9 |
|
| 10 |
if [ ! -n "$NAME" ]; then |
| 11 |
NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1` |
| 12 |
fi |
| 13 |
|
| 14 |
if [ ! -n "$VERSION" ]; then |
| 15 |
VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'` |
| 16 |
fi |
| 17 |
|
| 18 |
PROGNAME=cnvkit.py |
| 19 |
|
| 20 |
MANDIR=debian/man |
| 21 |
|
| 22 |
mkdir -p $MANDIR |
| 23 |
|
| 24 |
|
| 25 |
AUTHOR=".SH AUTHOR\n \ |
| 26 |
This manpage was written by $DEBFULLNAME for the Debian distribution and\n \ |
| 27 |
can be used for any other usage of the program.\ |
| 28 |
" |
| 29 |
|
| 30 |
# If program name is different from package name or title should be |
| 31 |
# different from package short description change this here |
| 32 |
progname=${PROGNAME} |
| 33 |
help2man --no-info --no-discard-stderr \ |
| 34 |
--name="$NAME" \ |
| 35 |
--version-string="$VERSION" ${progname} > $MANDIR/${progname}.1 |
| 36 |
echo $AUTHOR >> $MANDIR/${progname}.1 |
| 37 |
|
| 38 |
progname=cnv_annotate.py |
| 39 |
help2man --no-info --no-discard-stderr \ |
| 40 |
--name="Update gene names in CNVkit .cnn/.cnr files" \ |
| 41 |
--version-string="$VERSION" ${progname} > $MANDIR/${progname}.1 |
| 42 |
echo $AUTHOR >> $MANDIR/${progname}.1 |
| 43 |
|
| 44 |
progname=cnv_expression_correlate.py |
| 45 |
help2man --no-info --no-discard-stderr \ |
| 46 |
--name="Calculate correlation coefficients for gene expression and copy number" \ |
| 47 |
--version-string="$VERSION" ${progname} > $MANDIR/${progname}.1 |
| 48 |
echo $AUTHOR >> $MANDIR/${progname}.1 |
| 49 |
|
| 50 |
|
| 51 |
debian/genmanpages.py "$VERSION" |
| 52 |
rm -f debian/*.man.include |
| 53 |
|
| 54 |
echo "$MANDIR/*.1" > debian/manpages |
| 55 |
|
| 56 |
cat <<EOT |
| 57 |
Please enhance the help2man output in '$MANDIR/${progname}.1'. |
| 58 |
To inspect it, try 'nroff -man $MANDIR/${progname}.1'. |
| 59 |
If very unhappy, try passing the HELPOPTION as an environment variable. |
| 60 |
The following web page might be helpful in doing so: |
| 61 |
http://liw.fi/manpages/ |
| 62 |
EOT |