Stefan Reinauer has uploaded this change for review.

View Change

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>
---
M util/lint/lint
1 file changed, 8 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/80436/1
diff --git a/util/lint/lint b/util/lint/lint
index 94cd4a6..b3551cf 100755
--- a/util/lint/lint
+++ b/util/lint/lint
@@ -22,6 +22,13 @@
printf "\n"
}

+# 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
+
#write to the junit xml file if --junit was specified
junit_write () {
if [ "$JUNIT" -eq 1 ]; then
@@ -29,7 +36,7 @@
fi
}

-if ! cmd_args="$(getopt -l help,junit,invert -o hIJ -- "$@")"; then
+if ! cmd_args="$($GETOPT -- "$@")"; then
usage
exit 0
fi

To view, visit change 80436. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ife26083d2de080af9ed3d509945720051ca14bd7
Gerrit-Change-Number: 80436
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-MessageType: newchange