diff options
author | Mike Frysinger <vapier@chromium.org> | 2017-05-06 04:24:18 -0400 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-11 01:58:55 -0700 |
commit | 3a6d6f886e80101dc63534c85b10e8c31c6fa77f (patch) | |
tree | e9b9f992ff3e038e17ef17de2a6ac15e928e218a | |
parent | f68d76c1cde3a9acb3693e93d25b4c98c4bd1f20 (diff) | |
download | vboot-3a6d6f886e80101dc63534c85b10e8c31c6fa77f.tar.gz |
image_signing: common.sh: prefix helper messages with $PROG by default
This makes the output easier to follow when multiple scripts are being run.
BRANCH=None
BUG=chromium:714598
TEST=signing images still works
Change-Id: I072994dd07cf559a60e8a139eaeaf000cbbf72e3
Reviewed-on: https://chromium-review.googlesource.com/497301
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
-rw-r--r-- | scripts/image_signing/common.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/image_signing/common.sh b/scripts/image_signing/common.sh index 657b5be2..33328612 100644 --- a/scripts/image_signing/common.sh +++ b/scripts/image_signing/common.sh @@ -5,6 +5,7 @@ # found in the LICENSE file. . "$(dirname "$0")/common_minimal.sh" +CROS_LOG_PREFIX="${PROG}: " # Array of actions that are executed during the clean up process. declare -a cleanup_actions @@ -50,21 +51,21 @@ V_VIDOFF="\e[0m" # Taken from src/scripts/common.sh. # Arg: MESSAGE info() { - echo -e >&2 "${V_BOLD_GREEN}INFO : $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_GREEN}${CROS_LOG_PREFIX:-}INFO : $1${V_VIDOFF}" } # Prints a warning message. # Taken from src/scripts/common.sh. # Arg: MESSAGE warn() { - echo -e >&2 "${V_BOLD_YELLOW}WARNING: $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_YELLOW}${CROS_LOG_PREFIX:-}WARNING: $1${V_VIDOFF}" } # Prints the specified error and exit the script with an error code. # Taken from src/scripts/common.sh. # Args: MESSAGE error() { - echo -e >&2 "${V_BOLD_RED}ERROR : $1${V_VIDOFF}" + echo -e >&2 "${V_BOLD_RED}${CROS_LOG_PREFIX:-}ERROR : $1${V_VIDOFF}" } # Prints an error message and exit with an error code. |