feature #1782: do not use extended parameters in non gnu getopt

This commit is contained in:
Javi Fontan committed 2013-02-28 16:18:53 +01:00
1 parent e3c09095f7
commit 4454909138
1 file changed
+7 -1
+7 -1
View File
@@ -49,7 +49,13 @@ usage() {
}
#-------------------------------------------------------------------------------
TEMP_OPT=`getopt -o hkrlcsou:g:d: -n 'install.sh' -- "$@"`
PARAMETERS="hkrlcsou:g:d:"
if [ $(getopt --version | tr -d " ") = "--" ]; then
TEMP_OPT=`getopt $PARAMETERS "$@"`
else
TEMP_OPT=`getopt -o $PARAMETERS -n 'install.sh' -- "$@"`
fi
if [ $? != 0 ] ; then
usage