Updated package list to match new versions / new packages.
[beastbuild.git] / build-docbook-catalog.diff
1 --- orig/build-docbook-catalog.orig     Sun May 17 06:56:17 2009
2 +++ src/build-docbook-catalog-1.4/build-docbook-catalog-1.4     Sat May  2 13:01:14 2009
3 @@ -24,14 +24,27 @@
4  main() {
5         typeset d v opts
6  
7 -       opts=$(getopt -o v --long verbose -n "$ZERO" -- "$@") || exit 1
8 -       eval set -- "$opts"
9 -       while true; do
10 -               case "$1" in
11 -                       -v|--verbose) VERBOSE=true ; shift ;;
12 -                       --) shift ; break ;;
13 -                       *) echo "Options parsing failed on $1!" >&2 ; exit 1 ;;
14 -               esac
15 +       # check for options
16 +       while test $# -gt 0; do
17 +           case "$1" in
18 +
19 +               -h|--help)
20 +                   echo "build-docbook-catalog [ -v ]"
21 +                   echo " "
22 +                   echo "rebuild /etc/xml/catalog and /etc/xml/docbook"
23 +                   exit 0
24 +                   ;;
25 +
26 +               -v|--verbose)
27 +                   VERBOSE=true
28 +                   shift
29 +                   ;;
30 +               *)
31 +                   echo "invalid argument: $1"
32 +                   exit 1
33 +                   break
34 +                   ;;
35 +           esac
36         done
37  
38         create_catalogs                 # will exit on error
39 @@ -78,9 +91,10 @@
40  # create the catalogs root and docbook specific
41  #
42  create_catalogs() {
43 +       mkdir -p /etc/xml
44         if [[ ! -r ${ROOTCATALOG} ]] ; then
45                 echo "Creating XML Catalog root ${ROOTCATALOG}"
46 -               /usr/bin/xmlcatalog --noout --create ${ROOTCATALOG}
47 +               xmlcatalog --noout --create ${ROOTCATALOG}
48                 if [[ ! -r ${ROOTCATALOG} ]] ; then
49                         echo "Failed creating ${ROOTCATALOG}, aborting" >&2
50                         exit 1
51 @@ -94,7 +108,7 @@
52  
53         if [[ ! -r ${CATALOG} ]] ; then
54                 echo "Creating DocBook XML Catalog ${CATALOG}"
55 -               /usr/bin/xmlcatalog --noout --create ${CATALOG}
56 +               xmlcatalog --noout --create ${CATALOG}
57                 if [[ ! -r ${CATALOG} ]] ; then
58                         echo "Failed creating ${CATALOG}, aborting" >&2
59                         exit 1