Loading tools/max.sh +42 −10 Original line number Diff line number Diff line Loading @@ -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' satisfied' fi } dependencies=(wget npm xmllint) for bin in ${dependencies[@]} do dependency_test $bin done #checks and set basex bin Loading Loading @@ -38,7 +57,6 @@ display_usage(){ } list_plugins(){ echo -e '' echo -e 'MaX plugins : ' Loading Loading @@ -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 Loading Loading @@ -255,7 +280,7 @@ init_max(){ #creates config file if not exists (.dist copy) if [ ! -f $DIRECTORY/../configuration/configuration.xml ] then echo "Configuration file does not exists: copying the .dist one" echo "Configuration file does not exist: copying the .dist one" cp $DIRECTORY/../configuration/configuration.dist.xml $DIRECTORY/../configuration/configuration.xml fi Loading @@ -268,10 +293,17 @@ then new_edition_build $project_id $db_path $xmlns read -e -p "XML sources path ? " data_path db_project_feed $db_path $data_path mkdir $DIRECTORY/../editions/$project_id/fragments mkdir $DIRECTORY/../editions/$project_id/xq 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/fonts mkdir $DIRECTORY/../editions/$project_id/ui/i18n mkdir $DIRECTORY/../editions/$project_id/ui/images mkdir $DIRECTORY/../editions/$project_id/ui/js mkdir $DIRECTORY/../editions/$project_id/ui/templates mkdir $DIRECTORY/../editions/$project_id/ui/xsl touch $DIRECTORY/../editions/$project_id/ui/css/$project_id.css cp $DIRECTORY/menu_default.xml $DIRECTORY/../editions/$project_id/menu.xml if [ $xmlns = 'ead' ] Loading Loading
tools/max.sh +42 −10 Original line number Diff line number Diff line Loading @@ -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' satisfied' fi } dependencies=(wget npm xmllint) for bin in ${dependencies[@]} do dependency_test $bin done #checks and set basex bin Loading Loading @@ -38,7 +57,6 @@ display_usage(){ } list_plugins(){ echo -e '' echo -e 'MaX plugins : ' Loading Loading @@ -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 Loading Loading @@ -255,7 +280,7 @@ init_max(){ #creates config file if not exists (.dist copy) if [ ! -f $DIRECTORY/../configuration/configuration.xml ] then echo "Configuration file does not exists: copying the .dist one" echo "Configuration file does not exist: copying the .dist one" cp $DIRECTORY/../configuration/configuration.dist.xml $DIRECTORY/../configuration/configuration.xml fi Loading @@ -268,10 +293,17 @@ then new_edition_build $project_id $db_path $xmlns read -e -p "XML sources path ? " data_path db_project_feed $db_path $data_path mkdir $DIRECTORY/../editions/$project_id/fragments mkdir $DIRECTORY/../editions/$project_id/xq 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/fonts mkdir $DIRECTORY/../editions/$project_id/ui/i18n mkdir $DIRECTORY/../editions/$project_id/ui/images mkdir $DIRECTORY/../editions/$project_id/ui/js mkdir $DIRECTORY/../editions/$project_id/ui/templates mkdir $DIRECTORY/../editions/$project_id/ui/xsl touch $DIRECTORY/../editions/$project_id/ui/css/$project_id.css cp $DIRECTORY/menu_default.xml $DIRECTORY/../editions/$project_id/menu.xml if [ $xmlns = 'ead' ] Loading