From 4dff7e709b1b8852ba96608560f403f5b36beef5 Mon Sep 17 00:00:00 2001 From: "Tzafrir Cohen (License #5035)" Date: Tue, 16 Oct 2012 13:16:14 +0200 Subject: [PATCH] fix bashism in autosupport --- contrib/scripts/autosupport | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport index 1d2e208..30cefe1 100644 --- a/contrib/scripts/autosupport +++ b/contrib/scripts/autosupport @@ -33,7 +33,8 @@ NONINTERACTIVE=0 # If a prefix is specified on command-line, add it. if (set -u; : $1) 2> /dev/null then - if [ $1 == "-h" ] || [ $1 == "--help" ]; then + case "$1" in + -h | --help) echo echo "Digium autosupport script" echo "Copyright (C) 2005-2010, Digium, Inc." @@ -53,12 +54,15 @@ then echo " XXXXXXXX_${TARBALL_OUTPUT_FILE}" echo exit - elif [ $1 == "-n" ] || [ $1 == "--non-interactive" ]; then + ;; + -n | --non-interactive) FILE_PREFIX= NONINTERACTIVE=1 - else + ;; + *) FILE_PREFIX="${FILE_PREFIX}${1}_"; - fi + ;; + esac fi MYUID=$(id -u); -- 1.7.10.4