1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-04-01 06:50:25 +03:00

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

This commit is contained in:
Javi Fontan 2013-02-25 21:15:26 +01:00
parent e3c09095f7
commit 4454909138

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