commit:     8a94952d5f7208e6fd75e4eef6c937c58bc8775e
Author:     Raul E Rangel <rrangel <AT> chromium <DOT> org>
AuthorDate: Tue Apr  4 22:13:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 03:42:52 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/build-docbook-catalog.git/commit/?id=8a94952d

Fix noisy find command

We weren't using nullglob, so the wildcard parameter was incorrectly
getting passed to `find`.

+ pushd /build/arm64-generic//usr/share/sgml/docbook
+ mapfile -d '' DTDS
++ find xml-dtd-4.3/ xml-dtd-4.5/ -name docbookx.dtd -print0
+ mapfile -d '' SIMPLE_DTDS
++ find 'xml-simple-dtd-*/' -name sdocbook.dtd -print0
find: ‘xml-simple-dtd-*/’: No such file or directory
+ popd

Signed-off-by: Raul E Rangel <rrangel <AT> chromium.org>
Closes: https://github.com/gentoo/build-docbook-catalog/pull/1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 build-docbook-catalog | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/build-docbook-catalog b/build-docbook-catalog
index 2275703..f5995da 100755
--- a/build-docbook-catalog
+++ b/build-docbook-catalog
@@ -137,8 +137,10 @@ set_dtds() {
        local d=${ROOT}${DOCBOOKDIR}
        if [[ -d ${d} ]] ; then
                pushd "${d}" >/dev/null || return 1
-               mapfile -d $'\0' DTDS < <(find xml-dtd-*/ -name docbookx.dtd 
-print0)
-               mapfile -d $'\0' SIMPLE_DTDS < <(find xml-simple-dtd-*/ -name 
sdocbook.dtd -print0)
+               shopt -s nullglob
+               DTDS=( xml-dtd-*/docbookx.dtd )
+               SIMPLE_DTDS=( xml-simple-dtd-*/sdocbook.dtd )
+               shopt -u nullglob
                popd >/dev/null || return 1
        fi
 

Reply via email to