summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2014-09-29 21:32:10 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2014-09-29 21:32:10 +0000
commitb56dfb78c5e6142c1071e73c91002a23fbf1b032 (patch)
treec3959d8d866df01deb328db4cbecd5d0765ea098 /contrib
parent270932635d8fa0babe6af40e71b5e867e7cb0599 (diff)
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 ........ Merged revisions 424125 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424126 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/autosupport12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 774bc5451..4d5ab5991 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);