Suggested-by: Dan McGee <[email protected]>
Signed-off-by: Cedric Staniewski <[email protected]>
---

Does by chance anybody know if it is possible to build readline without 
ncurses? If so, we should add tput (ncurses) dependency to the header.

 scripts/makepkg.sh.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 2a3d22d..b89acdb 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1555,13 +1555,13 @@ fi
 
 # check if messages are to be printed using color
 if [ -t 2 -a ! "$USE_COLOR" = "n" -a "$(check_buildenv color)" = "y" ]; then
-       readonly ALL_OFF="\033[1;0m" \
-                                               BOLD="\033[1;1m"
+       readonly ALL_OFF="$(tput sgr0)" \
+                                               BOLD="$(tput bold)"
        readonly ALL_OFF_BOLD="${ALL_OFF}${BOLD}" \
-                                               RED="${BOLD}\033[1;31m" \
-                                               BLUE="${BOLD}\033[1;34m" \
-                                               GREEN="${BOLD}\033[1;32m" \
-                                               YELLOW="${BOLD}\033[1;33m"
+                                               RED="${BOLD}$(tput setaf 1)" \
+                                               BLUE="${BOLD}$(tput setaf 4)" \
+                                               GREEN="${BOLD}$(tput setaf 2)" \
+                                               YELLOW="${BOLD}$(tput setaf 3)"
 else
        unset ALL_OFF ALL_OFF_BOLD BOLD RED BLUE GREEN YELLOW
        readonly ALL_OFF ALL_OFF_BOLD BOLD RED BLUE GREEN YELLOW
-- 
1.6.5.1


Reply via email to