diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 774bc54514c56895dfdb49d0fe3d1802f8650b5b..4d5ab59913acc7df87f4af94c99c78637f1462aa 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);