diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-27 22:41:10 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-27 22:41:10 +0000 |
commit | 2776ce3d9cefda63b7874c06fe66f16e9d36c633 (patch) | |
tree | b19b5d3b02fcb210b96859b263ab40e6d910617f /build-docbook-catalog | |
parent | use `local` rather than `typeset` to better match current Gentoo style (diff) | |
download | build-docbook-catalog-2776ce3d9cefda63b7874c06fe66f16e9d36c633.tar.gz build-docbook-catalog-2776ce3d9cefda63b7874c06fe66f16e9d36c633.tar.bz2 build-docbook-catalog-2776ce3d9cefda63b7874c06fe66f16e9d36c633.zip |
check to see if DOCBOOKDIR exists before running `find` to avoid ugly errors with missing dirs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'build-docbook-catalog')
-rwxr-xr-x | build-docbook-catalog | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/build-docbook-catalog b/build-docbook-catalog index 74ffc81..f3246bd 100755 --- a/build-docbook-catalog +++ b/build-docbook-catalog @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /usr/local/src/gentoo/gentoo-src/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.10 2012/03/27 22:39:03 vapier Exp $ +# $Header: /usr/local/src/gentoo/gentoo-src/cvsroot/gentoo-src/build-docbook-catalog/build-docbook-catalog,v 1.11 2012/03/27 22:41:10 vapier Exp $ # # build-docbook-catalog: populate /etc/xml/docbook based in # installed docbook-xml-dtd versions. @@ -93,8 +93,13 @@ error() { # fill in the DTDS variable based on installed versions # set_dtds() { - DTDS=$(find ${DOCBOOKDIR} -path '*/xml-dtd-*/docbookx.dtd') - SIMPLE_DTDS=$(find ${DOCBOOKDIR} -path '*/xml-simple-dtd-*/sdocbook.dtd') + DTDS= SIMPLE_DTS= + + if [[ -d ${DOCBOOKDIR} ]] ; then + DTDS=$(find ${DOCBOOKDIR} -path '*/xml-dtd-*/docbookx.dtd') + SIMPLE_DTDS=$(find ${DOCBOOKDIR} -path '*/xml-simple-dtd-*/sdocbook.dtd') + fi + if [[ -z ${DTDS} ]]; then echo "No installed DocBook XML DTDs found" return 1 |