Use the standard db2html instead of our db2html-winehq script.
This commit is contained in:
parent
02f3df3988
commit
bc5b931d3f
|
@ -1,122 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
|
|
||||||
## Customized version of db2html to make it easier to use alternate
|
|
||||||
## stylesheets. Some versions of db2html support a '-d' option to
|
|
||||||
## specify this, but not all. We'll explicitly specify that here.
|
|
||||||
##
|
|
||||||
## John R. Sheets <jsheets@codeweavers.com>
|
|
||||||
|
|
||||||
## The DocBook installations behave differently for the various Linux
|
|
||||||
## distributions. Try to make some sense out of it all....
|
|
||||||
##
|
|
||||||
## $LINUXDIST holds the name of the distribution
|
|
||||||
## $JADETAG adds "/#html" to the stylesheet-specification in the Jade
|
|
||||||
## command line (see comments below), if necessary for that dist.
|
|
||||||
|
|
||||||
LINUXDIST="Generic"
|
|
||||||
JADEPROG="jade"
|
|
||||||
JADETAG=
|
|
||||||
|
|
||||||
if [ -f /etc/debian_version ]; then
|
|
||||||
LINUXDIST="Debian"
|
|
||||||
JADEPROG="jade"
|
|
||||||
JADETAG=\#html
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /etc/redhat-release ]; then
|
|
||||||
LINUXDIST="Redhat"
|
|
||||||
JADEPROG="jade"
|
|
||||||
JADETAG=
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f /usr/bin/crux ]; then
|
|
||||||
LINUXDIST="Crux"
|
|
||||||
JADEPROG="openjade"
|
|
||||||
JADETAG=
|
|
||||||
fi
|
|
||||||
|
|
||||||
## FIXME: Add more distributions here...
|
|
||||||
|
|
||||||
if [ -n "$LINUXDIST" ]; then
|
|
||||||
echo "Using db2html parameters for a $LINUXDIST Linux distribution..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Use included default.dsl DSSSL stylesheet unless explicitly overridden with
|
|
||||||
## the $WINEDOC_STYLESHEET envar.
|
|
||||||
##
|
|
||||||
## NOTE: The invoked DSSSL stylesheet *MUST* have an HTML-specific section
|
|
||||||
## in it; otherwise, jade will spew everything to stdout and fail to use
|
|
||||||
## the stated stylesheet. Something like this:
|
|
||||||
##
|
|
||||||
## <style-specification id="html" use="docbook">
|
|
||||||
if [ -z "$WINEDOC_STYLESHEET" ]; then
|
|
||||||
DB_STYLESHEET=../default.dsl
|
|
||||||
else
|
|
||||||
DB_STYLESHEET=$WINEDOC_STYLESHEET
|
|
||||||
fi
|
|
||||||
|
|
||||||
output=db2html-dir
|
|
||||||
TMPDIR=DBTOHTML_OUTPUT_DIR$$
|
|
||||||
|
|
||||||
echo TMPDIR is $TMPDIR
|
|
||||||
|
|
||||||
echo "Using stylesheet: \"${DB_STYLESHEET}\""
|
|
||||||
|
|
||||||
if [ $# -gt 2 ]
|
|
||||||
then
|
|
||||||
echo "Usage: `basename $0` [filename.sgml]" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
if [ ! -r $1 ]
|
|
||||||
then
|
|
||||||
echo Cannot read \"$1\". Exiting. >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
# now make sure that the output directory is always a subdirectory
|
|
||||||
# of the current directory
|
|
||||||
input_file=`basename $1`
|
|
||||||
output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
|
|
||||||
echo "input file was called $input_file -- output will be in $output"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir $TMPDIR
|
|
||||||
SAVE_PWD=`pwd`
|
|
||||||
if [ $1 = `basename $1` ]; then
|
|
||||||
EXTRA_PATH=../
|
|
||||||
else
|
|
||||||
EXTRA_PATH=
|
|
||||||
fi
|
|
||||||
|
|
||||||
JADE_CMD="$JADEPROG -t sgml -ihtml -d ${DB_STYLESHEET}${JADETAG} ${EXTRA_PATH}$1"
|
|
||||||
echo "Invoking command '$JADE_CMD'"
|
|
||||||
echo
|
|
||||||
|
|
||||||
echo "working on ${EXTRA_PATH}$1"
|
|
||||||
(cd $TMPDIR; $JADE_CMD; cd $SAVE_PWD)
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
if [ -d "${output}.junk" ]
|
|
||||||
then
|
|
||||||
/bin/rm -rf "${output}.junk"
|
|
||||||
fi
|
|
||||||
if [ -d "${output}" ]
|
|
||||||
then
|
|
||||||
mv "$output" "${output}.junk"
|
|
||||||
fi
|
|
||||||
echo "about to rename temporary directory to $output"
|
|
||||||
mv "${TMPDIR}" "$output"
|
|
||||||
else
|
|
||||||
cat "$TMPDIR"/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf "$TMPDIR"
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -27,14 +27,14 @@ fi
|
||||||
mkdir "$WWWDIR"
|
mkdir "$WWWDIR"
|
||||||
|
|
||||||
## Create five-book HTML tarball
|
## Create five-book HTML tarball
|
||||||
echo "./db2html-winehq wine-user.sgml"
|
echo "db2html wine-user.sgml"
|
||||||
./db2html-winehq wine-user.sgml
|
db2html wine-user.sgml
|
||||||
echo "./db2html-winehq wine-devel.sgml"
|
echo "db2html wine-devel.sgml"
|
||||||
./db2html-winehq wine-devel.sgml
|
db2html wine-devel.sgml
|
||||||
echo "./db2html-winehq winelib-user.sgml"
|
echo "db2html winelib-user.sgml"
|
||||||
./db2html-winehq winelib-user.sgml
|
db2html winelib-user.sgml
|
||||||
echo "./db2html-winehq wine-faq.sgml"
|
echo "db2html wine-faq.sgml"
|
||||||
./db2html-winehq wine-faq.sgml
|
db2html wine-faq.sgml
|
||||||
tar czf winedoc-html.tgz wine-user wine-devel winelib-user wine-faq
|
tar czf winedoc-html.tgz wine-user wine-devel winelib-user wine-faq
|
||||||
cp winedoc-html.tgz "$WWWDIR"
|
cp winedoc-html.tgz "$WWWDIR"
|
||||||
|
|
||||||
|
@ -64,25 +64,22 @@ cp winedoc-pdf.tgz "$WWWDIR"
|
||||||
|
|
||||||
## Create SGML tarball
|
## Create SGML tarball
|
||||||
echo "Creating SGML package..."
|
echo "Creating SGML package..."
|
||||||
tar czf winedoc-sgml.tgz *.sgml *.dsl *.ent db2html-winehq
|
tar czf winedoc-sgml.tgz *.sgml *.dsl *.ent
|
||||||
cp winedoc-sgml.tgz "$WWWDIR"
|
cp winedoc-sgml.tgz "$WWWDIR"
|
||||||
|
|
||||||
## Done creating downloadable tarballs for users. Now we want to
|
## Done creating downloadable tarballs for users. Now we want to
|
||||||
## create a tarball of SHTML in a slightly different form, for the
|
## create a tarball of SHTML in a slightly different form, for the
|
||||||
## website. These versions use special server-side includes which
|
## website. These versions use special server-side includes which
|
||||||
## aren't appropriate outside of winehq.com.
|
## aren't appropriate outside of winehq.com.
|
||||||
##
|
|
||||||
## Use the special website stylesheet
|
|
||||||
export WINEDOC_STYLESHEET=../winehq.dsl
|
|
||||||
|
|
||||||
## Create four-book SHTML tarball
|
## Create four-book SHTML tarball
|
||||||
echo "./db2html-winehq wine-user.sgml"
|
echo "db2html wine-user.sgml"
|
||||||
./db2html-winehq wine-user.sgml
|
db2html wine-user.sgml
|
||||||
echo "./db2html-winehq wine-devel.sgml"
|
echo "db2html wine-devel.sgml"
|
||||||
./db2html-winehq wine-devel.sgml
|
db2html wine-devel.sgml
|
||||||
echo "./db2html-winehq winelib-user.sgml"
|
echo "db2html winelib-user.sgml"
|
||||||
./db2html-winehq winelib-user.sgml
|
db2html winelib-user.sgml
|
||||||
echo "./db2html-winehq wine-faq.sgml"
|
echo "db2html wine-faq.sgml"
|
||||||
./db2html-winehq wine-faq.sgml
|
db2html wine-faq.sgml
|
||||||
tar czf winehq-shtml.tgz wine-user wine-devel winelib-user wine-faq
|
tar czf winehq-shtml.tgz wine-user wine-devel winelib-user wine-faq
|
||||||
cp winehq-shtml.tgz "$WWWDIR"
|
cp winehq-shtml.tgz "$WWWDIR"
|
||||||
|
|
Loading…
Reference in New Issue