/[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.8 Revision 1.9
1#!/bin/bash 1#!/bin/bash
2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.8 2012/03/27 21:23:00 vapier Exp $ 2# $Header: /var/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.9 2012/03/27 21:28:18 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-2012 Gentoo Foundation 7# Copyright 2004-2012 Gentoo Foundation
17LATEST_DATE= 17LATEST_DATE=
18VERBOSE=false 18VERBOSE=false
19ZERO=${0##*/} 19ZERO=${0##*/}
20 20
21# 21#
22# usage!
23#
24usage() {
25 cat <<-EOF
26 Usage: ${ZERO} [options]
27
28 Options:
29 -v, --verbose Be verbose
30 -h, --help This!
31 EOF
32 [[ $# -gt 0 ]] && eerror "$*"
33 exit 0
34}
35
36#
22# main (called from bottom) 37# main (called from bottom)
23# 38#
24main() { 39main() {
25 typeset d v opts 40 typeset d v opts
26 41
27 opts=$(getopt -o v --long verbose -n "$ZERO" -- "$@") || exit 1 42 opts=$(getopt -o hv --long help,verbose -n "$ZERO" -- "$@") || exit 1
28 eval set -- "$opts" 43 eval set -- "$opts"
29 while true; do 44 while true; do
30 case "$1" in 45 case "$1" in
46 -h|--help) usage ;;
31 -v|--verbose) VERBOSE=true ; shift ;; 47 -v|--verbose) VERBOSE=true ;;
32 --) shift ; break ;; 48 --) break ;;
33 *) error "options parsing failed on $1!" ;; 49 *) usage "options parsing failed on $1!" ;;
34 esac 50 esac
51 shift
35 done 52 done
36 53
37 create_catalogs # will exit on error 54 create_catalogs # will exit on error
38 for type in xsl xsl-ns xsl-saxon xsl-xalan; do 55 for type in xsl xsl-ns xsl-saxon xsl-xalan; do
39 populate_xsl $type 56 populate_xsl $type

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20