[asterisk-commits] wdoekes: branch 12 r424125 - in /branches/12: ./ contrib/scripts/autosupport

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 29 16:25:35 CDT 2014


Author: wdoekes
Date: Mon Sep 29 16:25:32 2014
New Revision: 424125

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424125
Log:
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

Modified:
    branches/12/   (props changed)
    branches/12/contrib/scripts/autosupport

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/contrib/scripts/autosupport
URL: http://svnview.digium.com/svn/asterisk/branches/12/contrib/scripts/autosupport?view=diff&rev=424125&r1=424124&r2=424125
==============================================================================
--- branches/12/contrib/scripts/autosupport (original)
+++ branches/12/contrib/scripts/autosupport Mon Sep 29 16:25:32 2014
@@ -34,7 +34,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-2013, Digium, Inc."
@@ -54,12 +55,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