#!/bin/sh

# Creates the necessary links for Docbook bibliography
# http://www.bortzmeyer.org/bibliographie-docbook.html

if [ -z "$DOCBOOK_LIB" ]; then
    DOCBOOK_LIB=$(dirname $0)
fi

if [ ! -e ${DOCBOOK_LIB}/find-biblio.xsl ]; then
    echo "${DOCBOOK_LIB} not a directory biblio, giving in." >&2
    exit 1
fi

for file in 2629toresources.xsl resources2docbook.xsl extract-biblio.xsl find-biblio.xsl extract-rfc.xsl find-rfc.xsl rfc.xml internet.dtd resources.dtd; do
    ln -sf ${DOCBOOK_LIB}/${file} ${file}
done
ln -sf ${DOCBOOK_LIB}/../biblio.xml biblio.xml
