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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#! /bin/sh
# $Progeny$
# This program is in the public domain.
# Too bad we don't have something like sysexits.h for POSIX sh...
EX_USAGE=64
if [ $# -ne 2 ]; then
exit ${EX_USAGE}
fi
refentry=$1.gen
name=$2
set -e
cat <<EOF > ${refentry}
<refmeta>
<refentrytitle>${name}</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>${name}</refname>
<refpurpose>config script</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>${name}</command>
<arg choice="opt">options</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><command>${name}</command> reports
stuff about the package's configuration.</para>
</refsect1>
<refsect1>
<title>Options</title>
<variablelist>
<varlistentry>
<term><option>--VAR</option></term>
<listitem>
<para>Print the value of the variable VAR followed by a
newline. See below for a list of available
variables.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-l, --list-vars</option></term>
<listitem>
<para>List the available variables.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Variables</title>
<itemizedlist>
EOF
cat >> ${refentry}
cat <<EOF >> ${refentry}
</itemizedlist>
</refsect1>
EOF
exit 0
|