Debian Codegraph @

debian/createmanpages

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 set -e
4
5 if [scip-shell system . . `[`. ! -x /usr/bin/help2manscip-shell filesystem . . `/usr/bin/help2man`. ]; then
6 echoscip-shell system . . echo. "E: Missing /usr/bin/help2man, please install it from the cognate package."
7 exit 1
8 fi
9
10 if [scip-shell system . . `[`. ! -n "$NAME" ]; then
11 NAME=`grepscip-shell system . . grep. "^Description:" debian/control | sedscip-shell system . . sed. 's/^Description: *//' | headscip-shell system . . head. -n1`
12 fi
13
14 if [scip-shell system . . `[`. ! -n "$VERSION" ]; then
15 VERSION=`dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | awkscip-shell system . . awk. '/^Version:/ {print $2}scip-shell filesystem . . `/^Version:/ {print $2}`.' | sedscip-shell system . . sed. -e 's/^[0-9]*://' -e 's/-.*//' -e 's/[+~]dfsg$//'`
16 fi
17
18 if [scip-shell system . . `[`. ! -n "$PROGNAME" ]; then
19 PROGNAME=`grepscip-shell system . . grep. "^Package:" debian/control | sedscip-shell system . . sed. 's/^Package: *//' | headscip-shell system . . head. -n1`
20 fi
21
22 MANDIR=debian
23 PROGNAME=yaegi
24 HELPOPTION='--help'
25 NAME='Yet Another Elegant Go Interpreter'
26
27 echoscip-shell system . . echo. "PROGNAME: '$PROGNAME'"
28 echoscip-shell system . . echo. "NAME: '$NAME'"
29 echoscip-shell system . . echo. "VERSION: '$VERSION'"
30 echoscip-shell system . . echo. "MANDIR: '$MANDIR'"
31 echoscip-shell system . . echo. "HELPOPTION: '$HELPOPTION'"
32
33 mkdirscip-shell system . . mkdir. -p $MANDIR
34
35
36 AUTHOR=".SH AUTHOR\n \
37 This manpage was written by $DEBFULLNAME for the Debian distribution and\n \
38 can be used for any other usage of the program.\
39 "
40
41 # If program name is different from package name or title should be
42 # different from package short description change this here
43 progname=${PROGNAME}
44 help2man --no-info --no-discard-stderr --help-option="$HELPOPTION" \
45 --name="$NAME" \
46 --version-string="$VERSION" ${progname} > $MANDIR/${progname}.1
47 echoscip-shell system . . echo. $AUTHOR >> $MANDIR/${progname}.1
48
49 echoscip-shell system . . echo. "$MANDIR/*.1" > debian/yaegi.manpages
50
51 catscip-shell system . . cat. <<EOT
52 Please enhance the help2man output in '$MANDIR/${progname}.1'.
53 To inspect it, try 'nroff -man $MANDIR/${progname}.1'.
54 If very unhappy, try passing the HELPOPTION as an environment variable.
55 The following web page might be helpful in doing so:
56 http://liw.fi/manpages/
57 EOT