[asterisk-commits] tzafrir: branch 1.8 r375059 - /branches/1.8/contrib/scripts/autosupport
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 16 14:13:10 CDT 2012
Author: tzafrir
Date: Tue Oct 16 14:13:08 2012
New Revision: 375059
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=375059
Log:
autosupport: fix bashism
'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
'case' works better there.
(closes issue ASTERISK-20567)
Modified:
branches/1.8/contrib/scripts/autosupport
Modified: branches/1.8/contrib/scripts/autosupport
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/contrib/scripts/autosupport?view=diff&rev=375059&r1=375058&r2=375059
==============================================================================
--- branches/1.8/contrib/scripts/autosupport (original)
+++ branches/1.8/contrib/scripts/autosupport Tue Oct 16 14:13:08 2012
@@ -33,7 +33,8 @@
# 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 @@
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);
More information about the asterisk-commits
mailing list