1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/build-support/setup-hooks/find-xml-catalogs.sh
John Ericson 046f091e0d treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
2017-12-30 22:04:22 -05:00

23 lines
691 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

addXMLCatalogs () {
local d i
# xml/dtd and xml/xsl are deprecated. Catalogs should be
# installed underneath share/xml.
for d in $1/share/xml $1/xml/dtd $1/xml/xsl; do
if [ -d $d ]; then
for i in $(find $d -name catalog.xml); do
XML_CATALOG_FILES+=" $i"
done
fi
done
}
if [ -z "$libxmlHookDone" ]; then
libxmlHookDone=1
# Set up XML_CATALOG_FILES. An empty initial value prevents
# xmllint and xsltproc from looking in /etc/xml/catalog.
export XML_CATALOG_FILES
if [ -z "$XML_CATALOG_FILES" ]; then XML_CATALOG_FILES=" "; fi
addEnvHooks "$hostOffset" addXMLCatalogs
fi