git-utils.sh 395 B

1234567891011121314151617
  1. #!/bin/bash
  2. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. TPUT=$(which tput 2>/dev/null)
  6. if test -x "$TPUT" && $TPUT setaf 1 >/dev/null ; then
  7. RED="$($TPUT setaf 1)"
  8. NORMAL="$($TPUT op)"
  9. else
  10. RED=
  11. NORMAL=
  12. fi
  13. warn() {
  14. echo "${RED}WARNING:${NORMAL} $@"
  15. }