Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/80436?usp=email )
Change subject: lint: Make lint work on Darwin ......................................................................
lint: Make lint work on Darwin
Darwin's getopt does not support the same parameters as the util-linux version and so it is not possible to commit any changes because lint fails.
Change-Id: Ife26083d2de080af9ed3d509945720051ca14bd7 Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/80436 Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/lint/lint 1 file changed, 8 insertions(+), 1 deletion(-)
Approvals: Felix Singer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/util/lint/lint b/util/lint/lint index 94cd4a6..1896db1 100755 --- a/util/lint/lint +++ b/util/lint/lint @@ -29,7 +29,14 @@ 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