Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pdn-certic
MaX
Commits
d2f43774
Commit
d2f43774
authored
Mar 25, 2022
by
Jerome Chauveau
Browse files
install des démos : récupération de la liste des plugins à activer par analyse du fichier de conf.
parent
9d20012e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/max.sh
View file @
d2f43774
...
...
@@ -36,9 +36,9 @@ EAD_DEMO_RELEASE_URL=$EAD_DEMO_URL"/-/archive/"$MAX_EAD_DEMO_VERSION_NUMBER"/"$M
SAXON_HE_URL
=
"https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/10.8/Saxon-HE-10.8.jar"
FOP_URL
=
"https://files.basex.org/modules/org/basex/modules/fop/FOP.jar"
TEI_DEMO_PLUGINS
=(
apparat_critique breadcrumb correction img_viewer search tei_pdf
)
DEFAULT_EAD_PLUGINS
=(
side_toc ead_basket
)
dependency_test
(){
result
=
$(
command
-v
$1
)
if
[
-z
$result
]
...
...
@@ -142,7 +142,7 @@ enable_plugin(){
fi
if
[
!
-d
$MAX_PLUGINS_DIR
/
$1
]
then
echo
"Oups ! Plugin
$1
does not exist."
echo
"Oups ! Plugin
"
$1
"
does not exist."
$MAX_PLUGINS_DIR
/
$1
echo
-e
''
return
fi
...
...
@@ -271,23 +271,18 @@ install_demo(){
return
1
fi
#include edition conf file in main max config one
include_project_config
$edition_name
#get plugins list from config file
plugin_list
=
$(
$BASEX_BIN
-q
'for $p in doc("../configuration/configuration.xml")//edition[@xml:id="'
$edition_name
'"]//plugin return string($p/@name)'
)
#enable plugins
if
[
$edition_name
==
'max_tei_demo'
]
then
plugin_list
=
${
TEI_DEMO_PLUGINS
[@]
}
else
plugin_list
=
${
DEFAULT_EAD_PLUGINS
[@]
}
fi
#then install plugins
for
plugin
in
${
plugin_list
[@]
}
do
enable_plugin
$plugin
$edition_name
done
#include edition conf file in main max config one
include_project_config
$edition_name
if
[
$?
-ne
0
]
then
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment