diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/lint/lint | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util/lint/lint b/util/lint/lint index 94cd4a6253..1896db1c48 100755 --- a/util/lint/lint +++ b/util/lint/lint @@ -29,7 +29,14 @@ junit_write () { fi } -if ! cmd_args="$(getopt -l help,junit,invert -o hIJ -- "$@")"; then +# Look if we have getopt. If not, build it. +if [ $(uname) == Darwin ]; then + GETOPT="getopt hIJ" +else + GETOPT="getopt -l help,junit,invert -o hIJ" +fi + +if ! cmd_args="$($GETOPT -- "$@")"; then usage exit 0 fi |