From 94bcf1e49becef00de942795f0c1a9bdcc3aa91c Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Tue, 7 May 2019 02:49:08 +0000 Subject: [PATCH] autoninja: Don't echo command-line unless NINJA_SUMMARIZE_BUILD=1 I want to use autoninja from //build/android/generate_gradle.py, but I invoke it with a *long* list of targets that I do not want echo'ed Bug: 803493 Change-Id: I98ad85b64ec7ce60b7e3df9827fb613cd57638e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1596535 Reviewed-by: Bruce Dawson Commit-Queue: Andrew Grieve --- autoninja | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoninja b/autoninja index bac7c3e611..50ec00d575 100755 --- a/autoninja +++ b/autoninja @@ -11,7 +11,9 @@ export AUTONINJA_BUILD_ID # Execute whatever is printed by autoninja.py. # Also print it to reassure that the right settings are being used. command=$(python "$(dirname -- "$0")/autoninja.py" "$@") -echo "$command" +if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then + echo "$command" +fi if eval "$command"; then if [ "$NINJA_SUMMARIZE_BUILD" == "1" ]; then python "$(dirname -- "$0")/post_build_ninja_summary.py" "$@"