/[gentoo-src]/build-docbook-catalog/build-docbook-catalog
Gentoo

Diff of /build-docbook-catalog/build-docbook-catalog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
1#!/bin/bash 1#!/bin/bash
2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.6 2011/03/29 02:11:48 flameeyes Exp $ 2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.7 2011/11/01 21:04:00 vapier Exp $
3# 3#
4# build-docbook-catalog: populate /etc/xml/docbook based in 4# build-docbook-catalog: populate /etc/xml/docbook based in
5# installed docbook-xml-dtd versions. 5# installed docbook-xml-dtd versions.
6# 6#
7# Copyright 2004 Gentoo Foundation 7# Copyright 2004 Gentoo Foundation
55 fi 55 fi
56 56
57 exit 0 57 exit 0
58} 58}
59 59
60# 60#
61# verbose echo -- only echo if called with --verbose 61# verbose echo -- only echo if called with --verbose
62# 62#
63verb() { 63verb() {
64 $VERBOSE && echo "$*" 64 $VERBOSE && echo "$*"
65} 65}
66 66
67# 67#
68# fill in the DTDS variable based on installed versions 68# fill in the DTDS variable based on installed versions
69# 69#
70set_dtds() { 70set_dtds() {
71 DTDS=$(find ${DOCBOOKDIR} -path '*/xml-dtd-*/docbookx.dtd') 71 DTDS=$(find ${DOCBOOKDIR} -path '*/xml-dtd-*/docbookx.dtd')
72 SIMPLE_DTDS=$(find ${DOCBOOKDIR} -path '*/xml-simple-dtd-*/sdocbook.dtd') 72 SIMPLE_DTDS=$(find ${DOCBOOKDIR} -path '*/xml-simple-dtd-*/sdocbook.dtd')
73 if [[ -z ${DTDS} ]]; then 73 if [[ -z ${DTDS} ]]; then
74 echo "No installed DocBook XML DTDs found" 74 echo "No installed DocBook XML DTDs found"
132 for f in ${list}; do 132 for f in ${list}; do
133 xmlcatalog --noout --del "${f}" ${catalog} 133 xmlcatalog --noout --del "${f}" ${catalog}
134 done 134 done
135} 135}
136 136
137# 137#
138# populate a specific dtd version into the docbook catalog 138# populate a specific dtd version into the docbook catalog
139# $1 == /path/to/docbookx.dtd 139# $1 == /path/to/docbookx.dtd
140# 140#
141populate_dtd() { 141populate_dtd() {
142 typeset dtd=$1 docbookdir=${1%/*} dtd_date 142 typeset dtd=$1 docbookdir=${1%/*} dtd_date
179 LATEST_DATE=${dtd_date} 179 LATEST_DATE=${dtd_date}
180 LATEST_DTD=${dtd} 180 LATEST_DTD=${dtd}
181 fi 181 fi
182} 182}
183 183
184# 184#
185# populate a specific simple dtd version into the docbook catalog 185# populate a specific simple dtd version into the docbook catalog
186# $1 == /path/to/sdocbook.dtd 186# $1 == /path/to/sdocbook.dtd
187# 187#
188populate_simple_dtd() { 188populate_simple_dtd() {
189 typeset dtd=$1 docbookdir=${1%/*} 189 typeset dtd=$1 docbookdir=${1%/*}

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20