* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we are
[gnupg.git] / scripts / mk-gpg-texi
blobe269b5493638d9fbdc950dd2c531dc0c126acaa1
1 #!/bin/sh
2 # Helper to create the texinfo versions from gpg.sgml
4 # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
6 # This file is free software; as a special exception the author gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
12 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 set -e
16 for file in gpg gpgv; do
17 sgml2xml -x lower ${file}.sgml >${file}.xml
18 # docbook2texi ${file}.xml | sed 's,--,---,' | (
19 docbook2x-texi --to-stdout ${file}.xml | \
20 sed '/^@setfilename/,/^@end direntry/d' | (
21 case "$file" in
22 *gpgv)
23 sed '/\\input texinfo/a \
24 @setfilename gpgv.info\
25 @dircategory GnuPG\
26 @direntry\
27 * gpgv: (gpgv). GnuPG signature verification tool.\
28 @end direntry
32 gpg)
33 sed '/\\input texinfo/a \
34 @setfilename gpg.info\
35 @dircategory GnuPG\
36 @direntry\
37 * gpg: (gpg). GnuPG encryption and signing tool.\
38 @end direntry
43 cat
45 esac
46 ) >${file}.texi
48 done