File: createmanpages

package info (click to toggle)
cnvkit 0.9.12-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 96,464 kB
  • sloc: python: 12,407; makefile: 263; sh: 84; xml: 38
file content (62 lines) | stat: -rwxr-xr-x 1,880 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

set -e

if [ ! -x /usr/bin/help2man ]; then
    echo "E: Missing /usr/bin/help2man, please install it from the cognate package."
    exit 1
fi

if [ ! -n "$NAME" ]; then
    NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
fi

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

PROGNAME=cnvkit.py

MANDIR=debian/man

mkdir -p $MANDIR


AUTHOR=".SH AUTHOR\n \
This manpage was written by $DEBFULLNAME for the Debian distribution and\n \
can be used for any other usage of the program.\
"

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

progname=cnv_annotate.py
help2man --no-info --no-discard-stderr \
         --name="Update gene names in CNVkit .cnn/.cnr files" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
echo $AUTHOR >> $MANDIR/${progname}.1

progname=cnv_expression_correlate.py
help2man --no-info --no-discard-stderr \
         --name="Calculate correlation coefficients for gene expression and copy number" \
            --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
echo $AUTHOR >> $MANDIR/${progname}.1


debian/genmanpages.py "$VERSION"
rm -f debian/*.man.include

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

cat <<EOT
Please enhance the help2man output in '$MANDIR/${progname}.1'.
To inspect it, try 'nroff -man $MANDIR/${progname}.1'.
If very unhappy, try passing the HELPOPTION as an environment variable.
The following web page might be helpful in doing so:
    http://liw.fi/manpages/
EOT