Commit 4a35c0aa authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

liens plugins en relatif. Fixes #83

parent bc3b7813
...@@ -6,6 +6,8 @@ AVAILABLE_PLUGINS_DIR=$DIRECTORY/../plugins-available ...@@ -6,6 +6,8 @@ AVAILABLE_PLUGINS_DIR=$DIRECTORY/../plugins-available
ENABLED_PLUGINS_DIR=$DIRECTORY/../plugins-enabled ENABLED_PLUGINS_DIR=$DIRECTORY/../plugins-enabled
MAX_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/default MAX_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/default
CUSTOM_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/custom CUSTOM_PLUGINS_DIR=$AVAILABLE_PLUGINS_DIR/custom
RELATIVE_MAX_PLUGINS_DIR=../plugins-available/default
RELATIVE_CUSTOM_PLUGINS_DIR=../plugins-available/custom
BASEX_CLIENT_BIN="basexclient" BASEX_CLIENT_BIN="basexclient"
BASEX_BIN="basex" BASEX_BIN="basex"
...@@ -74,19 +76,20 @@ enable_plugin(){ ...@@ -74,19 +76,20 @@ enable_plugin(){
if [ -d $MAX_PLUGINS_DIR/$1 ] if [ -d $MAX_PLUGINS_DIR/$1 ]
then then
target=$MAX_PLUGINS_DIR/$1 target=$RELATIVE_MAX_PLUGINS_DIR/$1
else else
if [ -d $CUSTOM_PLUGINS_DIR/$1 ] if [ -d $RELATIVE_CUSTOM_PLUGINS_DIR/$1 ]
then then
target=$CUSTOM_PLUGINS_DIR/$1 target=$RELATIVE_CUSTOM_PLUGINS_DIR/$1
else else
echo "Oups ! Plugin $1 does not exist." echo "Oups ! Plugin $1 does not exist."
return return
fi fi
fi fi
cd $ENABLED_PLUGINS_DIR
ln -s $target $ENABLED_PLUGINS_DIR/$1 ln -s $target $1
cd $DIRECTORY
node $DIRECTORY/edition_manager.js -plugin $1 node $DIRECTORY/edition_manager.js -plugin $1
echo -e "Plugin $1 successfully enabled." echo -e "Plugin $1 successfully enabled."
echo -e '' echo -e ''
......
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