mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 06:05:13 +00:00
23 lines
695 B
Bash
23 lines
695 B
Bash
addSGMLCatalogs () {
|
|
if test -d $1/sgml/dtd; then
|
|
for i in $(find $1/sgml/dtd -name docbook.cat); do
|
|
export SGML_CATALOG_FILES="${SGML_CATALOG_FILES:+:}$i"
|
|
done
|
|
fi
|
|
}
|
|
|
|
if test -z "$sgmlHookDone"; then
|
|
sgmlHookDone=1
|
|
|
|
# Set http_proxy and ftp_proxy to a invalid host to prevent
|
|
# xmllint and xsltproc from trying to download DTDs from the
|
|
# network even when --nonet is not given. That would be impure.
|
|
# (Note that .invalid is a reserved domain guaranteed not to
|
|
# work.)
|
|
export http_proxy=http://nodtd.invalid/
|
|
export ftp_proxy=http://nodtd.invalid/
|
|
|
|
export SGML_CATALOG_FILES
|
|
envHooks+=(addSGMLCatalogs)
|
|
fi
|