Debian Codegraph @

lib/webhelp

raw
1 # -*-Shell-script-*-
2 #
3 # Copyright (C) 2015-2020 SUSE Software Solutions Germany GmbH
4 #
5 # Author:
6 # Frank Sundermeyer <fsundermeyer at opensuse dot org>
7 #
8 ###########################################################################
9 #
10 # WEBHELP
11 #
12 # Subcommands: webhelp
13 #
14 ###########################################################################
15 function webhelp {
16 local EXTENSION SHORT_OPTS LONG_OPTS SUB_CMD
17 SUB_CMD=$1
18 shift
19
20 SHORT_OPTS="h"
21 LONG_OPTS="clean,css:,draft,help,name:,norefcheck,nosearch,nostatic,not-validate-tables,param:,remarks,rootid:,static,stringparam:,xsltparam:"
22
23 parse_args "$SHORT_OPTS" "$LONG_OPTS" "$SUB_CMD" "$@"
24 eval set -- "$P_REMAIN_ARGS"
25
26 #------ Computing the values returned from the parser -----
27 if [[ 1 -eq $P_HELP ]]; then
28 help_scmd_head "$SUB_CMD" "${HELP_SUBCOMMAND[$SUB_CMD]}"
29 help_clean
30 help_css
31 help_draft
32 help_help
33 help_name
34 help_not-validate-tables
35 help_norefcheck
36 help_nosearch
37 help_nostatic
38 help_param
39 help_remarks
40 help_rootid
41 help_stringparam "creates Webhelp HTML from the profiled sources"
42 echo
43 exit 0
44 fi
45
46 for EXTENSION in $DOCBOOK_STYLES/extensions/webhelpindexer.jar \
47 $DOCBOOK_STYLES/extensions/lucene-analyzers-*.jar \
48 $DOCBOOK_STYLES/extensions/lucene-core-*.jar \
49 $DOCBOOK_STYLES/extensions/tagsoup-*.jar; do
50 if [[ ! -f $EXTENSION ]]; then
51 exit_on_error "\nwebhelp only works when a recent snapshot of the DocBook stylesheets is\ninstalled. Your version of the DocBook styles at\n$DOCBOOK_STYLES\nis not webhelp capable."
52 fi
53 done
54
55 if [[ -n "$P_CSS" ]]; then
56 if [[ $P_CSS = "none" || -f "$P_CSS" ]]; then
57 export HTML_CSS="$P_CSS"
58 else
59 exit_on_error "Cannot find CSS file $P_CSS (have you specified a correct path?)."
60 fi
61 fi
62
63 call_make "$SUB_CMD" "$@"
64 }