]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
bootstrap.sh: Polish output (#1301)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 8 Mar 2023 12:52:53 +0000 (12:52 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 10 Mar 2023 23:18:49 +0000 (23:18 +0000)
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

index 34abd9993b62872782ef31af9def8614ef0b58ea..bf0cea53824caa96866794844b328dcc6d2a256b 100755 (executable)
@@ -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