Skip to content

Commit

Permalink
Better enablement of plugins (CO-1996)
Browse files Browse the repository at this point in the history
  • Loading branch information
skoranda committed Jul 31, 2020
1 parent b13e7db commit c1397f2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions comanage-registry-base/comanage_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,25 @@ function comanage_utils::enable_plugins() {

# Enable any supported non-core plugins if requested.
if [[ -n "$COMANAGE_REGISTRY_ENABLE_PLUGIN" ]]; then
# Clear the caches.
comanage_utils::registry_clear_cache

local plugins
local plugin
plugins=(`echo "$COMANAGE_REGISTRY_ENABLE_PLUGIN" | sed -e 's@,@ @g'`) > "$OUTPUT" 2>&1
pushd "$COMANAGE_REGISTRY_DIR/local/Plugin" > "$OUTPUT" 2>&1
for plugin in "${plugins[@]}";
do
echo "Enabling available plugin $plugin..." > "$OUTPUT" 2>&1
pushd "$COMANAGE_REGISTRY_DIR/local/Plugin" > "$OUTPUT" 2>&1
ln -s "../../app/AvailablePlugin/$plugin" "$plugin" > "$OUTPUT" 2>&1
popd > "$OUTPUT" 2>&1
pushd "$COMANAGE_REGISTRY_DIR/app" > "$OUTPUT" 2>&1
./Console/cake database > "$OUTPUT" 2>&1
popd > "$OUTPUT" 2>&1
done

# Clear the caches.
popd > "$OUTPUT" 2>&1
pushd "$COMANAGE_REGISTRY_DIR/app" > "$OUTPUT" 2>&1
./Console/cake database > "$OUTPUT" 2>&1
popd > "$OUTPUT" 2>&1

# Clear the caches again.
comanage_utils::registry_clear_cache
fi
}
Expand Down

0 comments on commit c1397f2

Please sign in to comment.