Commit 6a2824ef authored by John R. Sheets's avatar John R. Sheets Committed by Alexandre Julliard

Clean up db2html-winehq HTML generation script. Works in Debian, and

may actually work in Redhat now, too.
parent 0005e81f
...@@ -6,10 +6,27 @@ ...@@ -6,10 +6,27 @@
## ##
## John R. Sheets <jsheets@codeweavers.com> ## John R. Sheets <jsheets@codeweavers.com>
## Other possible SGML stylesheets (default Debian versions...may be ## The DocBook installations behave differently for the various Linux
## different on other distributions). ## distributions. Try to make some sense out of it all....
#DB_STYLESHEET=/usr/lib/sgml/stylesheet/dsssl/docbook/cygnus/cygnus-both.dsl ##
#DB_STYLESHEET=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl ## $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.
if [ -a /etc/debian_version ]; then
LINUXDIST="Debian"
JADETAG=\#html
fi
if [ -a /etc/redhat_release ]; then
LINUXDIST="Redhat"
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 ## Use included default.dsl DSSSL stylesheet unless explicitly overridden with
## the $WINEDOC_STYLESHEET envar. ## the $WINEDOC_STYLESHEET envar.
...@@ -49,7 +66,6 @@ then ...@@ -49,7 +66,6 @@ then
then then
# now make sure that the output directory is always a subdirectory # now make sure that the output directory is always a subdirectory
# of the current directory # of the current directory
echo
input_file=`basename $1` input_file=`basename $1`
output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`" output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
echo "input file was called $input_file -- output will be in $output" echo "input file was called $input_file -- output will be in $output"
...@@ -60,13 +76,18 @@ fi ...@@ -60,13 +76,18 @@ fi
mkdir $TMPDIR mkdir $TMPDIR
SAVE_PWD=`pwd` SAVE_PWD=`pwd`
if [ $1 = `basename $1` ]; then if [ $1 = `basename $1` ]; then
echo "working on ../$1" EXTRA_PATH=../
(cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html ../$1; cd $SAVE_PWD)
else else
echo "working on $1" EXTRA_PATH=
(cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html $1; cd $SAVE_PWD)
fi fi
JADE_CMD="jade -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 ] if [ $# -eq 1 ]
then then
if [ -d ${output}.junk ] if [ -d ${output}.junk ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment