Loading tools/max.sh +31 −26 Original line number Diff line number Diff line Loading @@ -6,6 +6,24 @@ AVAILABLE_PLUGINS_DIR=$DIRECTORY/../plugins-available ENABLED_PLUGINS_DIR=$DIRECTORY/../plugins-enabled MAX_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/default CUSTOM_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/custom BASEX_CLIENT_BIN="basexclient" BASEX_BIN="basex" #checks and set basex bin a=$(command -v basexclient) if [ -z $a ] && [ -z $BASEX_PATH ] then echo "Please install BaseX or set \$BASEX_PATH environment variable" exit 1 else if [ -z $a ] then BASEX_CLIENT_BIN=$BASEX_PATH"/bin/basexclient" BASEX_BIN=$BASEX_PATH"/bin/basex" fi fi display_usage(){ echo "" Loading Loading @@ -91,7 +109,7 @@ disable_plugin(){ enable_project_plugins(){ config_file=$DIRECTORY/../editions/$1/$1_config_inc.xml plugins=$(basex -i$config_file "for \$i in //plugins/plugin/@name return string(\$i)") plugins=$($BASEX_BIN -i$config_file "for \$i in //plugins/plugin/@name return string(\$i)") for p in $plugins do enable_plugin $p done Loading Loading @@ -137,19 +155,7 @@ db_demo_feed(){ } #adds xml datas to a new db db_project_feed(){ a=$(command -v basexclient) if [ -z $a ] && [ -z $BASEX_PATH ] then echo "Please install BaseX or set \$BASEX_PATH environment variable" exit 1 else if [ ! -z $a ] then feed_cmd="basexclient -p$PORT -w -cfeed.txt" else feed_cmd="$BASEX_PATH/bin/basexclient -p$PORT -w -cfeed.txt" fi feed_cmd=$BASEX_CLIENT_BIN" -p$PORT -w -cfeed.txt" echo "Please type your BaseX login/password :" echo "CREATE DATABASE "$1 > feed.txt echo "ADD "$2 >> feed.txt Loading @@ -161,7 +167,6 @@ db_project_feed(){ rm feed.txt echo "INFO: The "$1" DB was successfully created." fi fi } demo_edition_build(){ Loading Loading
tools/max.sh +31 −26 Original line number Diff line number Diff line Loading @@ -6,6 +6,24 @@ AVAILABLE_PLUGINS_DIR=$DIRECTORY/../plugins-available ENABLED_PLUGINS_DIR=$DIRECTORY/../plugins-enabled MAX_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/default CUSTOM_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/custom BASEX_CLIENT_BIN="basexclient" BASEX_BIN="basex" #checks and set basex bin a=$(command -v basexclient) if [ -z $a ] && [ -z $BASEX_PATH ] then echo "Please install BaseX or set \$BASEX_PATH environment variable" exit 1 else if [ -z $a ] then BASEX_CLIENT_BIN=$BASEX_PATH"/bin/basexclient" BASEX_BIN=$BASEX_PATH"/bin/basex" fi fi display_usage(){ echo "" Loading Loading @@ -91,7 +109,7 @@ disable_plugin(){ enable_project_plugins(){ config_file=$DIRECTORY/../editions/$1/$1_config_inc.xml plugins=$(basex -i$config_file "for \$i in //plugins/plugin/@name return string(\$i)") plugins=$($BASEX_BIN -i$config_file "for \$i in //plugins/plugin/@name return string(\$i)") for p in $plugins do enable_plugin $p done Loading Loading @@ -137,19 +155,7 @@ db_demo_feed(){ } #adds xml datas to a new db db_project_feed(){ a=$(command -v basexclient) if [ -z $a ] && [ -z $BASEX_PATH ] then echo "Please install BaseX or set \$BASEX_PATH environment variable" exit 1 else if [ ! -z $a ] then feed_cmd="basexclient -p$PORT -w -cfeed.txt" else feed_cmd="$BASEX_PATH/bin/basexclient -p$PORT -w -cfeed.txt" fi feed_cmd=$BASEX_CLIENT_BIN" -p$PORT -w -cfeed.txt" echo "Please type your BaseX login/password :" echo "CREATE DATABASE "$1 > feed.txt echo "ADD "$2 >> feed.txt Loading @@ -161,7 +167,6 @@ db_project_feed(){ rm feed.txt echo "INFO: The "$1" DB was successfully created." fi fi } demo_edition_build(){ Loading