diff options
| author | Alyssa Ross | 2016-09-07 20:24:02 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2016-09-07 20:24:02 +0100 |
| commit | 37beacd37d76a069c3819d5c67e07d15a9934069 (patch) | |
| tree | dcc9c67b0f95796f0ca6863654f9326162554e4b /Library | |
| parent | 04ebd0af33eb101582bf0944e31140ee9799b4cf (diff) | |
| download | brew-37beacd37d76a069c3819d5c67e07d15a9934069.tar.bz2 | |
Revert "Implement opoo in bash"
This reverts commit 2498d99a143d0e50e92a0aa60316d47c9ea83edc.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/brew.sh | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index fd1accef5..1651e8262 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -1,35 +1,20 @@ HOMEBREW_VERSION="0.9.9" -o() { - if [[ $# -eq 0 ]] +onoe() { + if [[ -t 2 ]] # check whether stderr is a tty. then - /bin/cat + echo -ne "\033[4;31mError\033[0m: " >&2 # highlight Error with underline and red color else - echo "$*" + echo -n "Error: " >&2 fi -} - -highlight() { - if [[ -t 1 ]] # check whether stdout is a tty. + if [[ $# -eq 0 ]] then - echo -ne "\033[4;$1m$2\033[0m" + /bin/cat >&2 else - echo -n "$2" + echo "$*" >&2 fi } -opoo() { - highlight 33 Warning >&2 # yellow - echo -n ": " >&2 - o "$@" >&2 -} - -onoe() { - highlight 31 Error >&2 # red - echo -n ": " >&2 - o "$@" >&2 -} - odie() { onoe "$@" exit 1 |
