]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: FreeBSD basic getopt does not use --options 21148/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 31 Mar 2018 00:01:01 +0000 (02:01 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 1 Apr 2018 12:43:34 +0000 (14:43 +0200)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/tools/setup-virtualenv.sh

index 336f4fca4982163b212623bad91f58447d9774ea..9ef0b74cf152c82847cc71fab441b8c8e6fb069d 100755 (executable)
 
 SCRIPTNAME="$(basename $0)"
 PYTHON_BINARY="python2.7"
+if [ `uname` == FreeBSD ]; then
+    GETOPT="/usr/local/bin/getopt"
+else
+    GETOPT=getopt
+fi
 
 function usage {
     echo
@@ -33,7 +38,7 @@ function usage {
     exit 1
 }
 
-TEMP=$(getopt --options "h" --long "help,python:" --name "$SCRIPTNAME" -- "$@")
+TEMP=$($GETOPT --options "h" --long "help,python:" --name "$SCRIPTNAME" -- "$@")
 test $? != 0 && usage
 eval set -- "$TEMP"