From e40700de05ef56664ac45acd27859e9dd1e1190b Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Wed, 8 Mar 2023 12:52:53 +0000 Subject: [PATCH] bootstrap.sh: Polish output (#1301) We use bootstrap.sh a lot in maintenance scripts but do not need to see its output on success. * Fix some incorrect uses of stderr and stdout such that all (and only) errors appear on stderr * Polish the message display when an error does occur detecting one of the tools. --- bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 34abd9993b..bf0cea5382 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -50,7 +50,7 @@ find_variant() done if [ "x$found" = "xNOT_FOUND" ]; then echo "WARNING: Cannot find $tool version $versions" >&2 - echo "Trying `$tool --version | head -1`" >&2 + echo "Trying `$tool --version 2>&1 | head -1`" >&2 found="" fi echo $found @@ -72,7 +72,7 @@ bootstrap() { if "$@"; then true # Everything OK else - echo "$1 failed" + echo "$1 failed" >&2 echo "Autotool bootstrapping failed. You will need to investigate and correct" ; echo "before you can develop on this source tree" exit 1 -- 2.47.2