Skip to content

Commit

Permalink
use getopt from homebrew on darwin (issue #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauleve committed Sep 8, 2017
1 parent 548acc3 commit 335525a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run-mtgo
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ lopts="dry-run,help,winecfg,shell,cmd:,name:"
lopts="${lopts},data,reset"
lopts="${lopts},no-tz"

brew_getopt="/usr/local/opt/gnu-getopt/bin/getopt"
if [[ $OSTYPE == darwin* ]] && [ -x $brew_getopt ]; then
alias getopt=$brew_getopt
fi

args="$(getopt -n "${0}" -o hv:u:e: --longoptions $lopts -- "${0}" "${@}")"
if [ $? -ne 0 ]; then
usage
Expand Down

0 comments on commit 335525a

Please sign in to comment.