Skip to content

Commit

Permalink
tools: FreeBSD basic getopt does not use --options
Browse files Browse the repository at this point in the history
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
  • Loading branch information
wjwithagen committed Apr 1, 2018
1 parent 7a24430 commit 877d856
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tools/setup-virtualenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

SCRIPTNAME="$(basename $0)"
PYTHON_BINARY="python2.7"
if [ `uname` == FreeBSD ]; then
GETOPT="/usr/local/bin/getopt"
else
GETOPT=getopt
fi

function usage {
echo
Expand All @@ -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"

Expand Down

0 comments on commit 877d856

Please sign in to comment.