mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-07 08:25:35 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
f68d76c1cd
commit
3a6d6f886e
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user