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=""
|
||||
# the binary packages that will contain generated manpages
|
||||
BINARIES=""
|
||||
# the binary packages with manpages in Section 3.
|
||||
HASMAN3=""
|
||||
# the Docbook XML manpages for Section 3.
|
||||
XMLMAN3=""
|
||||
# the binary packages using DocBook XML & xsltproc
|
||||
XMLPACKAGES=""
|
||||
# the DocBook XML files (TODO: let this take paths)
|
||||
XMLFILE=""
|
||||
# the DocBook XML files for Section 1.
|
||||
XMLMAN1=""
|
||||
# the pattern to find the XML files
|
||||
XMLDIR=""
|
||||
# the pattern to find the .docbook files
|
||||
|
@ -182,7 +182,7 @@ fi
|
|||
for d in $BINARIES; do
|
||||
for l in $LANGS; do
|
||||
mkdir -p $BASEDIR/$d/man/$l/man1/
|
||||
if [ "$d" = "$HASMAN3" ]; then
|
||||
if [ "$d" = "$XMLsMAN3" ]; then
|
||||
mkdir -p $BASEDIR/$d/man/$l/man3/
|
||||
fi
|
||||
if [ -n "$PODMODULES" ]; then
|
||||
|
@ -196,7 +196,7 @@ for d in $BINARIES; do
|
|||
fi
|
||||
done
|
||||
mkdir -p $BASEDIR/$d/man/man1/
|
||||
if [ "$d" = "$HASMAN3" ]; then
|
||||
if [ "$d" = "$XMLMAN3" ]; then
|
||||
mkdir -p $BASEDIR/$d/man/man3/
|
||||
fi
|
||||
mkdir -p $BASEDIR/pod/$l/
|
||||
|
@ -224,16 +224,17 @@ fi
|
|||
for d in $BINARIES; do
|
||||
for P in $XMLPACKAGES; do
|
||||
if [ $d = $P ]; then
|
||||
for X in $XMLFILE; do
|
||||
echo "Processing untranslated files for $d . . ."
|
||||
for X in $XMLMAN1; do
|
||||
echo "Processing untranslated files for $X (1). . ."
|
||||
MANDIR=$BASEDIR/$P/man/man1/
|
||||
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||
xsltproc -o $BASEDIR/$P/man/ --nonet $XSLFILE $XMLDIR/$X
|
||||
if [ "$d" = "$HASMAN3" ]; then
|
||||
mv $BASEDIR/$P/man/*.3 $BASEDIR/$P/man/man3/
|
||||
else
|
||||
rm -f $BASEDIR/$P/man/*.3
|
||||
fi
|
||||
mv $BASEDIR/$P/man/*.1 $BASEDIR/$P/man/man1/
|
||||
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X
|
||||
done
|
||||
for X3 in $XMLMAN3; do
|
||||
echo "Processing untranslated files for $X3 (3). . ."
|
||||
MANDIR=$BASEDIR/$P/man/man3/
|
||||
XML_CATALOG_FILES="/etc/xml/catalog" \
|
||||
xsltproc -o $MANDIR --nonet $XSLFILE $XMLDIR/$X3
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
@ -273,19 +274,22 @@ for d in $BINARIES; do
|
|||
for l in $LANGS; do
|
||||
for P in $XMLPACKAGES; do
|
||||
if [ $d = "$P" ]; then
|
||||
for X in $XMLFILE; do
|
||||
for X in $XMLMAN1; do
|
||||
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" \
|
||||
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
|
||||
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
|
||||
done
|
||||
for POD in $PODPACKAGES; do
|
||||
|
|
|
@ -10,12 +10,12 @@ POTFILE="doc/po/emdebian-rootfs.pot"
|
|||
BASEDIR="doc"
|
||||
# the binary packages that will contain generated manpages
|
||||
BINARIES="emdebian-rootfs multistrap"
|
||||
# the binary packages with manpages in Section 3.
|
||||
HASMAN3="emdebian-rootfs"
|
||||
# the Docbook XML manpages for Section 3.
|
||||
XMLMAN3="empbuilderlib.3.xml emrootfslib.3.xml"
|
||||
# the binary packages using DocBook XML & xsltproc
|
||||
XMLPACKAGES="emdebian-rootfs"
|
||||
# the DocBook XML files (TODO: let this take paths)
|
||||
XMLFILE="emdebian-rootfs.1.xml"
|
||||
# the DocBook XML files for Section 1.
|
||||
XMLMAN1="emsandbox.1.xml"
|
||||
# the pattern to find the XML files
|
||||
XMLDIR="doc/xml/"
|
||||
# the pattern to find the .docbook files
|
||||
|
|
Loading…
Reference in a new issue