diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-07-31 08:28:21 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-08-04 14:34:53 +0200 |
commit | f3dca9e3c3373a5817582d4b583077b8f9358604 (patch) | |
tree | ea76ef30c91cf194ec7b47f59df44d452f26e10b /tools/meson-check-help.sh | |
parent | f3061b4c6efa8275466c56f291eca43d36178213 (diff) |
General: Update build system to upstream support of meson+ninja.
Upstream thinks, that the auto tools are too 'legacy', or that they
are at least no longer fitting.
We follow, as the classic auto tools files have been removed, so no
other choice here...
Diffstat (limited to 'tools/meson-check-help.sh')
-rwxr-xr-x | tools/meson-check-help.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/meson-check-help.sh b/tools/meson-check-help.sh new file mode 100755 index 000000000..47a5099a0 --- /dev/null +++ b/tools/meson-check-help.sh @@ -0,0 +1,20 @@ +#!/bin/sh -eu + +# output width +if "$1" --help | grep -v 'default:' | grep -E -q '.{80}.'; then + echo "$(basename "$1") --help output is too wide:" + "$1" --help | awk 'length > 80' | grep -E --color=yes '.{80}' + exit 1 +fi + +# no --help output to stdout +if "$1" --help 2>&1 1>/dev/null | grep .; then + echo "$(basename "$1") --help prints to stderr" + exit 2 +fi + +# error output to stderr +if ! "$1" --no-such-parameter 2>&1 1>/dev/null | grep -q .; then + echo "$(basename "$1") with an unknown parameter does not print to stderr" + exit 3 +fi |