summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-08-31 11:26:39 +0200
committerJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-20 11:10:48 +0200
commitb28fbfce63963edc060927f641cbb00f9944fc50 (patch)
tree233461d3120e9322a711292cca8a6f319314ed6a /scripts
parentd68b63fafcd35f5d180541c1b8bb0fa534e7bc1b (diff)
downloadrabbitmq-server-git-b28fbfce63963edc060927f641cbb00f9944fc50.tar.gz
Define ERL_LIBS when RabbitMQ runs from its source directory
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rabbitmq-env13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index 3eef90e141..7450450953 100755
--- a/scripts/rabbitmq-env
+++ b/scripts/rabbitmq-env
@@ -235,6 +235,19 @@ rmq_check_if_shared_with_mnesia \
##--- End of overridden <var_name> variables
+## Development-specific environment.
+if [ -f "${RABBITMQ_HOME}/erlang.mk" ]; then
+ # When RabbitMQ or the rabbitmq* scripts are started from the source
+ # directory, they need the location of rabbit_common.
+ if [ -d "${RABBITMQ_HOME}/dist" ]; then
+ ERL_LIBS="${RABBITMQ_HOME}/dist:${ERL_LIBS}"
+ fi
+ if [ "${DEPS_DIR}" -a -d "$(dirname "${DEPS_DIR}")" ]; then
+ ERL_LIBS="$(dirname ${DEPS_DIR})/dist:${ERL_LIBS}"
+ fi
+ ERL_LIBS=${ERL_LIBS%:}
+fi
+
RABBITMQ_ENV_LOADED=1
# Since we source this elsewhere, don't accidentally stop execution