File: webhelpindexer

package info (click to toggle)
daps 3.3.2%2Bcleaned1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,540 kB
  • sloc: xml: 9,773; sh: 3,059; python: 1,322; lisp: 380; makefile: 239
file content (63 lines) | stat: -rwxr-xr-x 1,703 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
#
# Copyright (C) 2012-2020 SUSE Software Solutions Germany GmbH
#
# Author:
# Thomas Schraitle <toms at opensuse dot org>
#
# webhelpindexer: creates index file(s) needed for the webhelp output
# taken from the build.xml file of the DocBook XSL distribution
#

. /usr/share/java-utils/java-functions

MAIN_CLASS=com.nexwave.nquindexer.IndexerMain

# The DocBook XSLT stylesheet path:
# DB="/usr/share/xml/docbook/stylesheet/nwalsh/current"
# "${output-dir}/content"
#HTMLDIR=""
# "${webhelp.indexer.language}"
#INDEXERLANGUAGE=""
# "${html.extension}"
HTMLEXTENSION="${HTMLEXTENSION:-.html}"
# "${enable.stemming}"
DOSTEM="${DOSTEM:-true}"
# "${toc.file}"
TOCFILE="${TOCFILE:-}"

BASE_FLAGS="-Dorg.xml.sax.driver=org.ccil.cowan.tagsoup.Parser -Djavax.xml.parsers.SAXParserFactory=org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl"

if [[ -z ${DB} ]]; then
echo "Environment variable DB not set. DB points to the path for the DocBook XSL stylesheets"
exit 1
elif [[ -n $VERBOSE ]]; then
 echo "Using DocBook XSL stylesheet path: $DB"
fi

if [[ -n ${HTMLDIR} ]]; then
BASE_FLAGS="$BASE_FLAGS -DhtmlDir=${HTMLDIR} "
fi
if [[ -n ${INDEXERLANGUAGE} ]]; then
BASE_FLAGS="$BASE_FLAGS -DindexerLanguage=${INDEXERLANGUAGE} "
fi
if [[ -n ${HTMLEXTENSION} ]]; then
BASE_FLAGS="$BASE_FLAGS -DhtmlExtension=${HTMLEXTENSION} "
fi
if [[ -n ${DOSTEM} ]]; then
BASE_FLAGS="$BASE_FLAGS -DdoStem=${DOSTEM} "
fi
if [[ -n ${TOCFILE} ]]; then
BASE_FLAGS="$BASE_FLAGS -DtocFile=${TOCFILE} "
fi

CLASSPATH="$CLASSPATH:$(build-classpath-directory $DB/extensions ${VERBOSE:+2>/dev/null})"

# Set parameters
set_jvm
# set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run $args $PARAMS