diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-24 16:19:01 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-24 16:19:01 +0100 |
| commit | 9099f9d241e3dfbe3ea5e0257881434e80553aa2 (patch) | |
| tree | b4211999c851b2b1efb9814f1378dd36d21084dc /scripts/rabbitmq-env | |
| parent | 33ba62ae1578b79e47a59136580743f34d665080 (diff) | |
| parent | 7ce5d5d4387ea49cd51c355bdd1f0ba5f4f88972 (diff) | |
| download | rabbitmq-server-git-9099f9d241e3dfbe3ea5e0257881434e80553aa2.tar.gz | |
Merge bug26148
Diffstat (limited to 'scripts/rabbitmq-env')
| -rwxr-xr-x | scripts/rabbitmq-env | 5 |
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}/.." |
