diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rabbitmq-env | 8 | ||||
| -rw-r--r-- | scripts/rabbitmq-script-wrapper | 7 |
2 files changed, 3 insertions, 12 deletions
diff --git a/scripts/rabbitmq-env b/scripts/rabbitmq-env index 4c1d0c9da2..dffed035ea 100644 --- a/scripts/rabbitmq-env +++ b/scripts/rabbitmq-env @@ -103,15 +103,11 @@ fi ##--- Set environment vars RABBITMQ_<var_name> to defaults if not set -SED_OPT="-E" -if [ $(uname -s) = "Linux" ]; then - SED_OPT="-r" -fi - rmq_normalize_path() { local path=$1 - echo "$path" | sed $SED_OPT -e 's,//+,/,g' -e 's,(.)/$,\1,' + # Remove redundant slashes and strip a trailing slash + echo "$path" | sed -e 's#/\{2,\}#/#g' -e 's#/$##' } rmq_normalize_path_var() { diff --git a/scripts/rabbitmq-script-wrapper b/scripts/rabbitmq-script-wrapper index ed4c276e53..9623f01709 100644 --- a/scripts/rabbitmq-script-wrapper +++ b/scripts/rabbitmq-script-wrapper @@ -15,14 +15,9 @@ ## Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved. ## -SED_OPT="-E" -if [ $(uname -s) = "Linux" ]; then - SED_OPT="-r" -fi - for arg in "$@" ; do # Wrap each arg in single quotes and wrap single quotes in double quotes, so that they're passed through cleanly. - arg=`printf %s "$arg" | sed $SED_OPT -e "s/'/'\"'\"'/g"` + arg=`printf %s "$arg" | sed -e "s#'#'\"'\"'#g"` CMDLINE="${CMDLINE} '${arg}'" done |
