mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-11 07:04:16 +02:00
This is needed for building PostgreSQL man pages. /usr/bin/xsltproc --nonet --path . --path . --stringparam pg.version '17.0' stylesheet-man.xsl postgres-full.xml I/O error : unsupported protocol: https warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" compilation error: file stylesheet-man.xsl line 7 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
44 lines
1,006 B
Bash
44 lines
1,006 B
Bash
#!/bin/sh
|
|
|
|
newver=${1%-r[0-9]*}
|
|
oldver=${2%-r[0-9]*}
|
|
|
|
docbookdir=/usr/share/xml/docbook
|
|
|
|
case "${0##*/}" in
|
|
docbook-xsl-ns*)
|
|
suffix=""
|
|
uris="http://cdn.docbook.org/release/xsl
|
|
http://docbook.sourceforge.net/release/xsl-ns"
|
|
;;
|
|
docbook-xsl-nons*)
|
|
suffix="-nons"
|
|
uris="http://cdn.docbook.org/release/xsl-nons
|
|
http://docbook.sourceforge.net/release/xsl"
|
|
;;
|
|
esac
|
|
|
|
if [ ! -f /etc/xml/catalog ]; then
|
|
xmlcatalog --noout --create /etc/xml/catalog
|
|
fi
|
|
|
|
if [ -n "$oldver" ]; then # upgrade
|
|
xmlcatalog --noout --del \
|
|
"file://$docbookdir/xsl-stylesheets-$oldver$suffix" \
|
|
etc/xml/catalog
|
|
fi
|
|
|
|
for url in $uris; do
|
|
for rewrite in rewriteSystem rewriteURI; do
|
|
for version in $newver current; do
|
|
xmlcatalog --noout --add "$rewrite" \
|
|
"$url/$version" \
|
|
"file://$docbookdir/xsl-stylesheets-$newver$suffix" \
|
|
etc/xml/catalog
|
|
xmlcatalog --noout --add "$rewrite" \
|
|
"$url/current" \
|
|
"file://$docbookdir/xsl-stylesheets-$newver$suffix" \
|
|
etc/xml/catalog
|
|
done
|
|
done
|
|
done
|