Commit 91c025a1 authored by Marie Bisson's avatar Marie Bisson
Browse files

Merge branch 'dev' into mb/corrcoquilles

récupération dev de jérome
parents d2a47529 ad2af5f3
Loading
Loading
Loading
Loading
+34 −9
Original line number Diff line number Diff line
@@ -5,6 +5,25 @@ DIRECTORY=$(cd `dirname $0` && pwd)
MAX_PLUGINS_DIR=$DIRECTORY/../plugins
BASEX_CLIENT_BIN="basexclient"
BASEX_BIN="basex"
DEMO_RELEASE_URL="https://git.unicaen.fr/chauveau/max-tei-demo/-/archive/v1.0/max-tei-demo-v1.0.zip"

dependency_test(){
  result=$(command -v $1)
  if [ -z $result ]
  then
      echo 'Dependency '$1' not satisfied - please install it first'
      exit -1
  else
      echo 'Dependency '$1' statisfied'
  fi
}

dependencies=(wget npm xmllint)

for bin in ${dependencies[@]}
do
    dependency_test $bin
done


#checks and set basex bin
@@ -38,7 +57,6 @@ display_usage(){
}



list_plugins(){
  echo -e ''
  echo -e 'MaX plugins : '
@@ -186,8 +204,15 @@ demo_edition_build(){
#    echo "  -> resource files copy: DONE"
    cd $DIRECTORY/../editions
    echo "Downloading Max TEI Demo ressources"
     wget https://git.unicaen.fr/chauveau/max-tei-demo/-/archive/v1.0/max-tei-demo-v1.0.zip

    wget $DEMO_RELEASE_URL

    getResult=$?
    if [ $getResult -ne 0 ]
    then
     echo 'MaX demo install error : Cannot fetch '$DEMO_RELEASE_URL
     exit -1
    fi
    unzip max-tei-demo-v1.0.zip
    mv max-tei-demo-v1.0 max_tei_demo
    rm max-tei-demo-v1.0.zip
@@ -270,7 +295,7 @@ then
    db_project_feed $db_path $data_path
    mkdir $DIRECTORY/../editions/$project_id/ui
    mkdir $DIRECTORY/../editions/$project_id/ui/css
    mkdir $DIRECTORY/../editions/$project_id/ui/js
    mkdir $DIRECTORY/../editions/$project_id/ui/xsl
    mkdir $DIRECTORY/../editions/$project_id/ui/images
    touch $DIRECTORY/../editions/$project_id/ui/css/$project_id.css
    cp $DIRECTORY/menu_default.xml $DIRECTORY/../editions/$project_id/menu.xml