Debian Codegraph @

lib/epub

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 # BUILD ePUB
11 #
12 # Subcommands: epub only
13 #
14 ###########################################################################
15 function build_epub {
16 local SHORT_OPTS LONG_OPTS SUB_CMD
17 SUB_CMD=$1
18 shift
19
20 SHORT_OPTS="h"
21 LONG_OPTS="check,css:,epub3,help,name:,norefcheck,not-validate-tables,param:,remarks,rootid:,statdir:,stringparam:"
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_check
30 help_css_epub
31 help_epub3
32 help_help
33 help_name
34 help_norefcheck
35 help_not-validate-tables
36 help_param
37 help_rootid
38 help_statdir
39 help_stringparam
40 echo
41 exit 0
42 fi
43
44 if [[ -n "$P_CSS" ]]; then
45 if [[ $P_CSS = "none" || -f "$P_CSS" ]]; then
46 export EPUB_CSS="$P_CSS"
47 else
48 exit_on_error "Cannot find CSS file $P_CSS (have you specified a correct path?)."
49 fi
50 fi
51
52 call_make "$SUB_CMD" "$@"
53 }