Debian Codegraph @

debian/createmanpages

raw
1 #!/bin/sh
2 MANDIR=debian/man
3 mkdir -p $MANDIR
4
5 VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
6 NAME=`grep "^Description:" debian/control | sed 's/^Description: *//' | head -n1`
7 PROGNAME=`grep "^Package:" debian/control | sed 's/^Package: *//' | head -n1`
8
9 AUTHOR=".SH AUTHOR\n \
10 This manpage was written by $DEBFULLNAME for the Debian distribution and\n \
11 can be used for any other usage of the program.\
12 "
13
14 # If program name is different from package name or title should be
15 # different from package short description change this here
16 progname=bamcleanheader.py
17 help2man --no-info --no-discard-stderr --help-option=" --help" \
18 --name="remove illegal and malformed fields from a BAM file's header" \
19 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
20 echo $AUTHOR >> $MANDIR/${progname}.1
21
22 progname=bamfilterrg.py
23 help2man --no-info --no-discard-stderr --help-option=" --help" \
24 --name="filter readgroup(s) from a BAM file" \
25 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
26 echo $AUTHOR >> $MANDIR/${progname}.1
27
28 progname=bamfixflags.py
29 help2man --no-info --no-discard-stderr --help-option=" --help" \
30 --name="filter readgroup(s) from a BAM file" \
31 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
32 echo $AUTHOR >> $MANDIR/${progname}.1
33
34 progname=bamgroupreads.py
35 help2man --no-info --no-discard-stderr --help-option=" --help" \
36 --name="Group BAM file by read IDs without sorting" \
37 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
38 echo $AUTHOR >> $MANDIR/${progname}.1
39
40 progname=bamheadrg.py
41 help2man --no-info --no-discard-stderr --help-option=" --help" \
42 --name="Inject readgroup info" \
43 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
44 echo $AUTHOR >> $MANDIR/${progname}.1
45
46 progname=bamlibs.py
47 help2man --no-info --no-discard-stderr --help-option=" --help" \
48 --name="output comma delimited string of read group IDs for each library" \
49 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
50 echo $AUTHOR >> $MANDIR/${progname}.1
51
52 progname=bamtofastq.py
53 help2man --no-info --no-discard-stderr --help-option=" --help" \
54 --name="Convert a coordinate sorted BAM file to FASTQ" \
55 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
56 echo $AUTHOR >> $MANDIR/${progname}.1
57
58 echo "$MANDIR/*.1" > debian/manpages
59
60 cat <<EOT
61 Please enhance the help2man output.
62 The following web page might be helpful in doing so:
63 http://liw.fi/manpages/
64 EOT