couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject git commit: Automatically support CouchDB plugins (GeoCouch, BrowserID, OAuth, etc.)
Date Wed, 06 Feb 2013 03:23:40 GMT
Updated Branches:
  refs/heads/master 8097f988d -> 3fab6bb55


Automatically support CouchDB plugins (GeoCouch, BrowserID, OAuth, etc.)


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/3fab6bb5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/3fab6bb5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/3fab6bb5

Branch: refs/heads/master
Commit: 3fab6bb55759b98c32908f2ca735c761de3479ab
Parents: 8097f98
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Wed Feb 6 03:23:00 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Wed Feb 6 03:23:00 2013 +0000

----------------------------------------------------------------------
 bin/couchdb.tpl.in |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/3fab6bb5/bin/couchdb.tpl.in
----------------------------------------------------------------------
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 81bb8b8..8b2581a 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -231,6 +231,23 @@ start_couchdb () {
         touch $PID_FILE
         interactive_option="+Bd -noinput"
     fi
+
+    # Find plugins and add them to the Erlang path.
+    if test -d "%localerlanglibdir%/../../plugins"; then
+        for plugin in "%localerlanglibdir%/../../plugins"/*; do
+            if echo "$ERL_ZFLAGS" | grep "$plugin/ebin" > /dev/null 2> /dev/null; then
+                : # It's already loaded.
+            else
+                if echo "$COUCH_PLUGIN_BLACKLIST" | grep "$plugin" > /dev/null 2> /dev/null;
then
+                    : # Do not use this plugin.
+                else
+                    ERL_ZFLAGS="$ERL_ZFLAGS -pz '$plugin/ebin'"
+                fi
+            fi
+        done
+        export ERL_ZFLAGS
+    fi
+
     command="%ERL% $interactive_option $ERL_START_OPTIONS \
         -env ERL_LIBS $ERL_LIBS:%localerlanglibdir% -couch_ini $start_arguments -s couch"
     if test "$BACKGROUND" = "true" -a "$RECURSED" = "false"; then


Mime
View raw message