properly separate man (3) from man (1) XML
git-svn-id: http://emdebian.org/svn/current@6676 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
parent
6c6f08b6bf
commit
10cb7e801b
2 changed files with 32 additions and 28 deletions
52
genmanpages
52
genmanpages
|
@ -29,12 +29,12 @@ POTFILE=""
|
||||||
BASEDIR=""
|
BASEDIR=""
|
||||||
# the binary packages that will contain generated manpages
|
# the binary packages that will contain generated manpages
|
||||||
BINARIES=""
|
BINARIES=""
|
||||||
# the binary packages with manpages in Section 3.
|
# the Docbook XML manpages for Section 3.
|
||||||
HASMAN3=""
|
XMLMAN3=""
|
||||||
# the binary packages using DocBook XML & xsltproc
|
# the binary packages using DocBook XML & xsltproc
|
||||||
XMLPACKAGES=""
|
XMLPACKAGES=""
|
||||||
# the DocBook XML files (TODO: let this take paths)
|
# the DocBook XML files for Section 1.
|
||||||
XMLFILE=""
|
XMLMAN1=""
|
||||||
# the pattern to find the XML files
|
# the pattern to find the XML files
|
||||||
XMLDIR=""
|
XMLDIR=""
|
||||||
# the pattern to find the .docbook files
|
# the pattern to find the .docbook files
|
||||||
|
@ -182,7 +182,7 @@ fi
|
||||||
for d in $BINARIES; do
|
for d in $BINARIES; do
|
||||||
for l in $LANGS; do
|
for l in $LANGS; do
|
||||||
mkdir -p $BASEDIR/$d/man/$l/man1/
|
mkdir -p $BASEDIR/$d/man/$l/man1/
|
||||||
if [ "$d" = "$HASMAN3" ]; then
|
if [ "$d" = "$XMLsMAN3" ]; then
|
||||||
mkdir -p $BASEDIR/$d/man/$l/man3/
|
mkdir -p $BASEDIR/$d/man/$l/man3/
|
||||||
fi
|
fi
|
||||||
if [ -n "$PODMODULES" ]; then
|
if [ -n "$PODMODULES" ]; then
|
||||||
|
@ -196,7 +196,7 @@ for d in $BINARIES; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
mkdir -p $BASEDIR/$d/man/man1/
|
mkdir -p $BASEDIR/$d/man/man1/
|
||||||
if [ "$d" = "$HASMAN3" ]; then
|
if [ "$d" = "$XMLMAN3" ]; then
|
||||||
mkdir -p $BASEDIR/$d/man/man3/
|
mkdir -p $BASEDIR/$d/man/man3/
|
||||||
fi
|
fi
|
||||||
mkdir -p $BASEDIR/pod/$l/
|
mkdir -p $BASEDIR/pod/$l/
|
||||||
|
@ -224,16 +224,17 @@ fi
|
||||||
for d in $BINARIES; do
|
for d in $BINARIES; do
|
||||||
for P in $XMLPACKAGES; do
|
for P in $XMLPACKAGES; do
|
||||||
if [ $d = $P ]; then
|
if [ $d = $P ]; then
|
||||||
for X in $XMLFILE; do
|
for X in $XMLMAN1; do
|
||||||
echo "Processing untranslated files for $d . . ."
|
echo "Processing untranslated files for $X (1). . ."
|
||||||
|
MANDIR=$BASEDIR/$P/man/man1/
|
||||||
XML_CATALOG_FILES="/etc/xml/catalog" \
|
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||||
xsltproc -o $BASEDIR/$P/man/ --nonet $XSLFILE $XMLDIR/$X
|
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X
|
||||||
if [ "$d" = "$HASMAN3" ]; then
|
done
|
||||||
mv $BASEDIR/$P/man/*.3 $BASEDIR/$P/man/man3/
|
for X3 in $XMLMAN3; do
|
||||||
else
|
echo "Processing untranslated files for $X3 (3). . ."
|
||||||
rm -f $BASEDIR/$P/man/*.3
|
MANDIR=$BASEDIR/$P/man/man3/
|
||||||
fi
|
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||||
mv $BASEDIR/$P/man/*.1 $BASEDIR/$P/man/man1/
|
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X3
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -273,19 +274,22 @@ for d in $BINARIES; do
|
||||||
for l in $LANGS; do
|
for l in $LANGS; do
|
||||||
for P in $XMLPACKAGES; do
|
for P in $XMLPACKAGES; do
|
||||||
if [ $d = "$P" ]; then
|
if [ $d = "$P" ]; then
|
||||||
for X in $XMLFILE; do
|
for X in $XMLMAN1; do
|
||||||
if [ -f $XMLDIR/$l/$X ]; then
|
if [ -f $XMLDIR/$l/$X ]; then
|
||||||
echo "Processing $l translations for $d . . ."
|
echo "Processing $l translations for $X (1). . ."
|
||||||
|
MANDIR=$BASEDIR/$P/man/$l/man1/
|
||||||
XML_CATALOG_FILES="/etc/xml/catalog" \
|
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||||
xsltproc -o $BASEDIR/$P/man/ --nonet $XSLFILE $XMLDIR/$l/$X
|
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for X3 in $XMLMAN3; do
|
||||||
|
if [ -f $XMLDIR/$l/$X3 ]; then
|
||||||
|
echo "Processing $l translations for $X3 (3). . ."
|
||||||
|
MANDIR=$BASEDIR/$P/man/$l/man3/
|
||||||
|
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||||
|
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X3
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$d" = "$HASMAN3" ]; then
|
|
||||||
mv $BASEDIR/$P/man/*.3 $BASEDIR/$P/man/$l/man3/
|
|
||||||
else
|
|
||||||
rm -f $BASEDIR/$P/man/*.3
|
|
||||||
fi
|
|
||||||
mv $BASEDIR/$P/man/*.1 $BASEDIR/$P/man/$l/man1/
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for POD in $PODPACKAGES; do
|
for POD in $PODPACKAGES; do
|
||||||
|
|
|
@ -10,12 +10,12 @@ POTFILE="doc/po/emdebian-rootfs.pot"
|
||||||
BASEDIR="doc"
|
BASEDIR="doc"
|
||||||
# the binary packages that will contain generated manpages
|
# the binary packages that will contain generated manpages
|
||||||
BINARIES="emdebian-rootfs multistrap"
|
BINARIES="emdebian-rootfs multistrap"
|
||||||
# the binary packages with manpages in Section 3.
|
# the Docbook XML manpages for Section 3.
|
||||||
HASMAN3="emdebian-rootfs"
|
XMLMAN3="empbuilderlib.3.xml emrootfslib.3.xml"
|
||||||
# the binary packages using DocBook XML & xsltproc
|
# the binary packages using DocBook XML & xsltproc
|
||||||
XMLPACKAGES="emdebian-rootfs"
|
XMLPACKAGES="emdebian-rootfs"
|
||||||
# the DocBook XML files (TODO: let this take paths)
|
# the DocBook XML files for Section 1.
|
||||||
XMLFILE="emdebian-rootfs.1.xml"
|
XMLMAN1="emsandbox.1.xml"
|
||||||
# the pattern to find the XML files
|
# the pattern to find the XML files
|
||||||
XMLDIR="doc/xml/"
|
XMLDIR="doc/xml/"
|
||||||
# the pattern to find the .docbook files
|
# the pattern to find the .docbook files
|
||||||
|
|
Loading…
Reference in a new issue