summaryrefslogtreecommitdiff
path: root/scripts/rabbitmq-env
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-06-24 16:46:58 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-06-24 16:46:58 +0100
commitc23c9583976ef7d1408f776e284ea083e3c75d1d (patch)
tree507a1867651b361b79addd808c5947e6e84aedbc /scripts/rabbitmq-env
parent3125b4f25cb1f64ec9d27e3a910abcba31957100 (diff)
parent9099f9d241e3dfbe3ea5e0257881434e80553aa2 (diff)
downloadrabbitmq-server-git-c23c9583976ef7d1408f776e284ea083e3c75d1d.tar.gz
Merge bug26169
Diffstat (limited to 'scripts/rabbitmq-env')
-rwxr-xr-xscripts/rabbitmq-env5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env
index b77416703d..69d5a9c9d0 100755
--- a/scripts/rabbitmq-env
+++ b/scripts/rabbitmq-env
@@ -15,10 +15,14 @@
## Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.
##
+# We set +e here since since our test for "readlink -f" below needs to
+# be able to fail.
+set +e
# Determine where this script is really located (if this script is
# invoked from another script, this is the location of the caller)
SCRIPT_PATH="$0"
while [ -h "$SCRIPT_PATH" ] ; do
+ # Determine if readlink -f is supported at all. TODO clean this up.
FULL_PATH=`readlink -f $SCRIPT_PATH 2>/dev/null`
if [ "$?" != "0" ]; then
REL_PATH=`readlink $SCRIPT_PATH`
@@ -31,6 +35,7 @@ while [ -h "$SCRIPT_PATH" ] ; do
SCRIPT_PATH=$FULL_PATH
fi
done
+set -e
SCRIPT_DIR=`dirname $SCRIPT_PATH`
RABBITMQ_HOME="${SCRIPT_DIR}/.."