@@ -35,23 +35,22 @@ function help {
|
|
35
35
|
# search is perform.
|
36
36
|
FLAG_SEARCH=""
|
37
37
|
|
38
|
-
# Initialize the
|
39
|
-
# specifies the backend
|
38
|
+
# Initialize the backend option. The backend option (`--backend')
|
39
|
+
# specifies the backend used to manipulate the repository
|
40
40
|
# documentation manual.
|
41
|
-
|
41
|
+
FLAG_BACKEND="docbook"
|
42
42
|
|
43
43
|
# Define file name (without extension) for documentation manual.
|
44
44
|
MANUAL_NAME=repository
|
45
45
|
|
46
46
|
# Interpret option arguments passed through the command-line.
|
47
|
-
|
47
|
+
${FUNCNAM}_getOptions
|
48
48
|
|
49
|
-
# Initialize functions
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
|
49
|
+
# Initialize backend functions. There is no need to load all
|
50
|
+
# backend-specific functions when we can use just one backend
|
51
|
+
# among many. Keep the cli_getFunctions function calling after all
|
52
|
+
# variables and arguments definitions.
|
53
|
+
cli_getFunctions "${FUNCDIR}/${FUNCDIRNAM}" "${FLAG_BACKEND}"
|
54
|
-
cli_getFunctions "${FUNCDIR}/${FUNCDIRNAM}"
|
55
54
|
|
56
55
|
# Redefine positional parameters using ARGUMENTS. At this point,
|
57
56
|
# option arguments have been removed from ARGUMENTS variable and
|
@@ -154,10 +153,10 @@ function help {
|
|
154
153
|
# Define manuals base directory. This is the place where
|
155
154
|
# documentation manuals base directory structures are stored
|
156
155
|
# and organized in.
|
157
|
-
MANUAL_BASEDIR="$(cli_getRepoTLDir)/Manuals/$(cli_getRepoName ${
|
156
|
+
MANUAL_BASEDIR="$(cli_getRepoTLDir)/Manuals/$(cli_getRepoName ${FLAG_BACKEND} -d)"
|
158
157
|
|
159
158
|
# Define base name for documentation manual files (without
|
160
|
-
# extension). This is the main file name used to build
|
159
|
+
# extension). This is the main file name used to build output
|
161
160
|
# related files (.info, .pdf, .xml, etc.).
|
162
161
|
MANUAL_BASEFILE="${MANUAL_BASEDIR}/${MANUAL_NAME}"
|
163
162
|
|
@@ -170,11 +169,12 @@ function help {
|
|
170
169
|
ENTRY=$(${FUNCNAM}_getEntry)
|
171
170
|
|
172
171
|
# Define documentation entry directory. This is the directory
|
173
|
-
# where the entry file is stored.
|
174
|
-
|
172
|
+
# where the entry file is stored. When the file extension be
|
173
|
+
# removed, consider that several backends could be used.
|
174
|
+
ENTRY_DIR=$(dirname ${ENTRY} | sed -r "s/\.${FLAG_BACKEND}$//")
|
175
175
|
|
176
176
|
# Define documentation entry file (without extension).
|
177
|
-
ENTRY_FILE=$(basename ${ENTRY} | sed -r
|
177
|
+
ENTRY_FILE=$(basename ${ENTRY} | sed -r "s/\.${FLAG_BACKEND}$//")
|
178
178
|
|
179
179
|
# Define directory to store documentation entries. At this
|
180
180
|
# point, we need to take a desition about documentation
|
@@ -201,7 +201,12 @@ function help {
|
|
201
201
|
# repository.
|
202
202
|
cli_syncroRepoChanges ${MANUAL_CHAPTER_DIR}
|
203
203
|
|
204
|
-
#
|
204
|
+
# Verify action name against the file ought to be initialized
|
205
|
+
# from. If the file exists it is very sure that it has been
|
206
|
+
# already initialized, so execute the action name. Otherwise,
|
207
|
+
# if the file doesn't exist, print an error message. It is not
|
208
|
+
# possible to execute a function which definition hasn't been
|
209
|
+
# initialized.
|
205
210
|
if [[ -f ${FUNCDIR}/${FUNCDIRNAM}/${ACTIONNAM}.sh ]];then
|
206
211
|
eval $ACTIONNAM
|
207
212
|
else
|