From: Walter Doekes Date: Mon, 29 Sep 2014 21:25:32 +0000 (+0000) Subject: autosupport: Fix bashism. X-Git-Tag: 12.7.0-rc1~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b65f03ea3e99db2a958bb0852fd109574df264;p=thirdparty%2Fasterisk.git autosupport: Fix bashism. '==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a 'case' works better there. Originally committed in r375059 and r375060 on 2012-10-16 21:13:08. ASTERISK-20567 #close Reported by: Tzafrir Cohen ........ Merged revisions 424117 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@424125 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport index 774bc54514..4d5ab59913 100644 --- a/contrib/scripts/autosupport +++ b/contrib/scripts/autosupport @@ -34,7 +34,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-2013, Digium, Inc." @@ -54,12 +55,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);