Commit d2f43774 authored by Jerome Chauveau's avatar 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
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment