Stefan Reinauer has uploaded this change for review. ( 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 --- 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