Commit 67da3401 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

simplification de l'activation des plugins par défaut (ead & démos)

parent 99593d83
......@@ -5,4 +5,5 @@
/configuration/configuration.xml
.idea
.DS_Store
/plugins/**/.ignore
\ No newline at end of file
/plugins/**/.ignore
tools/dist
\ No newline at end of file
......@@ -36,6 +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/11.2/Saxon-HE-11.2.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 ]
......@@ -103,7 +106,7 @@ display_usage(){
echo " -n: Deploy new edition with its XML sources."
echo " --d-tei: Deploy the TEI demo edition project."
echo " --d-ead: Deploy the EAD demo edition project."
echo " --list-plugins: show plugins and status."
echo " --list-plugins: Show plugins and status."
echo " --enable-plugin [plugin_name]: Enable [plugin_name] plugin."
echo " --disable-plugin [plugin_name]: Disable [plugin_name] plugin."
echo ""
......@@ -268,20 +271,21 @@ install_demo(){
return 1
fi
#enable plugins
if [ $edition_name == 'max_tei_demo' ]
then
enable_plugin apparat_critique max_tei_demo
enable_plugin breadcrumb max_tei_demo
enable_plugin correction max_tei_demo
enable_plugin img_viewer max_tei_demo
enable_plugin search max_tei_demo
enable_plugin tei_pdf max_tei_demo
plugin_list=${TEI_DEMO_PLUGINS[@]}
else
enable_plugin side_toc max_ead_demo
enable_plugin ead_basket max_ead_demo
plugin_list=${DEFAULT_EAD_PLUGINS[@]}
fi
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
......@@ -337,12 +341,13 @@ deploy_new_edition(){
echo "<h1>À propos</h1>" >> $DIRECTORY/../editions/$project_id/fragments/fr/about.frag.html
echo "<p>Modifiez moi dans editions/$project_id/fragments/fr/about.frag.html.</p>" >> $DIRECTORY/../editions/$project_id/fragments/fr/about.frag.html
echo "</section>" >> $DIRECTORY/../editions/$project_id/fragments/fr/about.frag.html
cp $DIRECTORY/menu_default.xml $DIRECTORY/../editions/$project_id/menu.xml
if [ $xmlns = 'ead' ]
then
enable_plugin 'ead_basket'
enable_plugin 'side_toc'
for plugin in ${DEFAULT_EAD_PLUGINS[@]}
do
enable_plugin $plugin $project_id
done
fi
echo ''
echo "Project "$project_id" is ready !"
......
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