diff options
Diffstat (limited to 'scripts/rabbitmq-env')
-rwxr-xr-x | scripts/rabbitmq-env | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env index b7eff421..69d5a9c9 100755 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -15,13 +15,14 @@ ## Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved. ## -## readlink exits with an error if the given argument is -## not a symlink +# 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` |