Commit 1084c806 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Merge branch 'dev'

parents 127a74ac 7a89edec
......@@ -5,6 +5,21 @@ last_gitlab_project_release(){
basename $(curl -fs -o/dev/null -w %{redirect_url} $1)
}
display_usage(){
echo ""
echo ""
echo " -h: Display help."
echo " -p: Specify BaseX port to use for db feed. Default one is "$PORT"."
echo " -i: Max initialization."
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 " --enable-plugin [plugin_name]: Enable [plugin_name] plugin."
echo " --disable-plugin [plugin_name]: Disable [plugin_name] plugin."
echo ""
}
PORT=1984
DIRECTORY=$(cd `dirname $0` && pwd)
......@@ -24,6 +39,7 @@ EAD_DEMO_URL="https://git.unicaen.fr/pdn-certic/max-ead-demo"
MAX_TEI_DEMO_VERSION_NUMBER=`last_gitlab_project_release $TEI_DEMO_URL'/-/releases/permalink/latest'`
if [ $? -gt 0 ]
then
display_usage
echo ''
echo 'MaX : Cannot access to remote url - please check your network configuration.'
exit 1
......@@ -38,7 +54,6 @@ FOP_URL="https://files.basex.org/modules/org/basex/modules/fop/FOP.jar"
DEFAULT_EAD_PLUGINS=(side_toc ead_basket)
dependency_test(){
result=$(command -v $1)
if [ -z $result ]
......@@ -71,7 +86,6 @@ install_jar_in_libs(){
echo $jar_name': ok'
}
echo "---------------------------"
echo " MaX - Utilities - "$MAX_VERSION
echo "---------------------------"
......@@ -81,6 +95,7 @@ a=$(command -v basexclient)
if [ -z $a ] && [ -z $BASEX_PATH ]
then
display_usage
echo "Please install BaseX or set \$BASEX_PATH environment variable"
exit 1
else
......@@ -91,27 +106,16 @@ else
fi
fi
echo ""
echo "Environment variable BASEX_PATH = "$BASEX_PATH
echo ""
#checks if fop & saxon he jar are in basex libs
echo ""
install_jar_in_libs $SAXON_HE_URL
install_jar_in_libs $FOP_URL
echo ""
display_usage(){
echo ""
echo ""
echo " -h: Display help."
echo " -p: Specify BaseX port to use for db feed. Default one is "$PORT"."
echo " -i: Max development env initialization."
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 " --enable-plugin [plugin_name]: Enable [plugin_name] plugin."
echo " --disable-plugin [plugin_name]: Disable [plugin_name] plugin."
echo ""
}
list_plugins(){
echo -e ''
......
#!/bin/bash
TARGET=max-install-test
DIRECTORY=/tmp/$TARGET
BASEX_URL=https://files.basex.org/releases/9.5/BaseX95.zip
cd /tmp
#remove existing test dir if exists
if [ -d $TARGET ]
then
echo 'delete existing test directory'
rm -rf $TARGET
fi
#create test tmp dir
mkdir $TARGET
cd $TARGET
git clone git@git.unicaen.fr:pdn-certic/MaX.git
#curl basex 9.5
basex_zip=`basename $BASEX_URL`
curl --silent -O $BASEX_URL
unzip $basex_zip
rm -rf $basex_zip
MAX_DIR=$DIRECTORY/MaX
echo 'Create symlink in basex webapp to MaX dir'
ln -s $MAX_DIR basex/webapp/
echo 'Export BASEX_PATH to '$DIRECTORY/basex
export BASEX_PATH=$DIRECTORY/basex
echo 'Initialize MaX'
./MaX/tools/max.sh -i
echo 'Run basexhttp'
./basex/bin/basexhttpstop -h4242
./basex/bin/basexhttp -h4242 &
echo 'Install Max Tei DEMO'
./MaX/tools/max.sh --d-tei
firefox http://localhost:4242/max_tei_demo
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