diff options
author | Cedric Staniewski <cedric@gmx.ca> | 2009-10-23 17:11:39 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-10-24 10:00:52 -0500 |
commit | 748bc8ebd41f5553c139c530358a72a83def7126 (patch) | |
tree | e8aca610f75b56ab59288dd55685ed1d615019e3 /scripts | |
parent | 013fc9a7952bd93f451fecafa937a73c5c492a73 (diff) |
makepkg: use tput for terminal-safe colored and bold text
Suggested-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/makepkg.sh.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 8e4f4dbe..bd89acc4 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -28,7 +28,7 @@ # makepkg uses quite a few external programs during its execution. You # need to have at least the following installed for makepkg to function: # bsdtar (libarchive), bzip2, coreutils, fakeroot, find (findutils), -# getopt (util-linux), gettext, grep, gzip, openssl, sed +# getopt (util-linux), gettext, grep, gzip, openssl, sed, tput (ncurses) # gettext initialization export TEXTDOMAIN='pacman' @@ -1561,12 +1561,12 @@ fi # check if messages are to be printed using color unset ALL_OFF BOLD BLUE GREEN RED YELLOW if [ -t 2 -a ! "$USE_COLOR" = "n" -a "$(check_buildenv color)" = "y" ]; then - ALL_OFF="\033[1;0m" - BOLD="\033[1;1m" - BLUE="${BOLD}\033[1;34m" - GREEN="${BOLD}\033[1;32m" - RED="${BOLD}\033[1;31m" - YELLOW="${BOLD}\033[1;33m" + ALL_OFF="$(tput sgr0)" + BOLD="$(tput bold)" + BLUE="${BOLD}$(tput setaf 4)" + GREEN="${BOLD}$(tput setaf 2)" + RED="${BOLD}$(tput setaf 1)" + YELLOW="${BOLD}$(tput setaf 3)" fi readonly ALL_OFF BOLD BLUE GREEN RED YELLOW |