~ubuntu-branches/ubuntu/maverick/sgml-data/maverick

« back to all changes in this revision

Viewing changes to create-debian-man-refs.sh

  • Committer: Bazaar Package Importer
  • Author(s): Adam Di Carlo
  • Date: 2005-04-21 11:48:10 UTC
  • Revision ID: james.westby@ubuntu.com-20050421114810-u7e0kdky1f12hzpj
Tags: 2.0.3
* remove symlinks build dependency from debian/control and rules;
  set urgency because this is a serious violation; closes: #301788
* update HTML ISO 15445; closes: #248675

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
man -u "please let there never be a man page with this name" > /dev/null 2>&1 \
 
6
    || true
 
7
 
 
8
echo <<EOF
 
9
<!-- File automatically generated by $0
 
10
 
 
11
        Debian Manual Page DocBook Reference Entities
 
12
 
 
13
     Use &man.<name>.<section>; to refer to these.  Should be valid in
 
14
     SGML or XML.
 
15
 
 
16
     This file is normally generated by the sgml-data postinst but you can
 
17
     re-run it at any time.
 
18
  -->
 
19
EOF
 
20
 
 
21
# take all man pages, the part before the dash, ignore any lines not
 
22
# starting with a letter and constituted of a word, space(s), and a
 
23
# word in parens
 
24
 
 
25
# FIXME: use the actual SGML/XML character limits
 
26
# FIXME: do it all in sed
 
27
 
 
28
whatis -w '*' |                  \
 
29
  sed -e 's/-.*$//; s/\[.*//;' | \
 
30
  grep '^[a-zA-Z0-9:]* ([a-zA-Z0-9:]\+)' | \
 
31
  sed -e 's/^\([^( ]*\) (\(.*\)).*$/<!ENTITY man.\1.\2 "<citerefentry><refentrytitle>\1<\/refentrytitle><manvolnum>\2<\/manvolnum><\/citerefentry>">/;'
 
32
 
 
33