From 4454909138e05ab3fcf9a8d42cbba5c5be98cb60 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 25 Feb 2013 21:15:26 +0100 Subject: [PATCH] feature #1782: do not use extended parameters in non gnu getopt --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index dee2497563..e3249faea0 100755 --- a/install.sh +++ b/install.sh @@ -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