mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 19:38:22 +00:00
autosupport: fix bashism
'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a 'case' works better there. (closes issue ASTERISK-20567) Reported by: Tzafrir Cohen git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@375059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -33,7 +33,8 @@ NONINTERACTIVE=0
|
|||||||
# If a prefix is specified on command-line, add it.
|
# If a prefix is specified on command-line, add it.
|
||||||
if (set -u; : $1) 2> /dev/null
|
if (set -u; : $1) 2> /dev/null
|
||||||
then
|
then
|
||||||
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
|
case "$1" in
|
||||||
|
-h | --help)
|
||||||
echo
|
echo
|
||||||
echo "Digium autosupport script"
|
echo "Digium autosupport script"
|
||||||
echo "Copyright (C) 2005-2010, Digium, Inc."
|
echo "Copyright (C) 2005-2010, Digium, Inc."
|
||||||
@@ -53,12 +54,15 @@ then
|
|||||||
echo " XXXXXXXX_${TARBALL_OUTPUT_FILE}"
|
echo " XXXXXXXX_${TARBALL_OUTPUT_FILE}"
|
||||||
echo
|
echo
|
||||||
exit
|
exit
|
||||||
elif [ $1 == "-n" ] || [ $1 == "--non-interactive" ]; then
|
;;
|
||||||
|
-n | --non-interactive)
|
||||||
FILE_PREFIX=
|
FILE_PREFIX=
|
||||||
NONINTERACTIVE=1
|
NONINTERACTIVE=1
|
||||||
else
|
;;
|
||||||
|
*)
|
||||||
FILE_PREFIX="${FILE_PREFIX}${1}_";
|
FILE_PREFIX="${FILE_PREFIX}${1}_";
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MYUID=$(id -u);
|
MYUID=$(id -u);
|
||||||
|
|||||||
Reference in New Issue
Block a user