[email protected] | 8a3e68a6 | 2010-02-19 19:03:30 | [diff] [blame] | 1 | #!/bin/bash |
[email protected] | 279d79f1 | 2012-04-25 01:25:40 | [diff] [blame] | 2 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 8a3e68a6 | 2010-02-19 19:03:30 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
4 | # found in the LICENSE file. | ||||
5 | |||||
[email protected] | 49da58e | 2010-03-29 14:38:09 | [diff] [blame] | 6 | TPUT=$(which tput 2>/dev/null) |
[email protected] | 8a3e68a6 | 2010-02-19 19:03:30 | [diff] [blame] | 7 | if test -x "$TPUT" && $TPUT setaf 1 >/dev/null ; then |
8 | RED="$($TPUT setaf 1)" | ||||
9 | NORMAL="$($TPUT op)" | ||||
10 | else | ||||
11 | RED= | ||||
12 | NORMAL= | ||||
13 | fi | ||||
14 | |||||
15 | warn() { | ||||
16 | echo "${RED}WARNING:${NORMAL} $@" | ||||
17 | } |