diff --git a/script/noosfero-plugins b/script/noosfero-plugins index 11eb404..0571316 100755 --- a/script/noosfero-plugins +++ b/script/noosfero-plugins @@ -87,7 +87,7 @@ _enable(){ plugin="$1" if [ -d "$available_plugins_dir/$plugin" ]; then - source="$available_plugins_dir/$plugin" + source="../../plugins/$plugin" else if [ ! -d "$plugin" ]; then echo "E: $plugin not found (needs to be an existing directory)" @@ -101,6 +101,9 @@ _enable(){ target="$enabled_plugins_dir/$plugin" base="$base_plugins_dir/$plugin" + + cd "$NOOSFERO_DIR/plugins/$plugin" + run "$source/before_enable.rb" if [ -h "$target" -o -h "$base" ]; then _say "$plugin already enabled" -- libgit2 0.21.2