[pacman-dev] [PATCH] makepkg: remove extra ansi color codes

Andrew Gregory andrew.gregory.8 at gmail.com
Tue Apr 2 19:53:43 EDT 2013


All those extra '\e[1;'s were just setting bold redundantly or
immediately being cancelled.

Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 scripts/makepkg.sh.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index da620a4..7ba53b0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2636,20 +2636,20 @@ if [[ -t 2 && ! $USE_COLOR = "n" ]] && check_buildenv "color" "y"; then
 		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)"
 	else
-		ALL_OFF="\e[1;0m"
-		BOLD="\e[1;1m"
-		BLUE="${BOLD}\e[1;34m"
-		GREEN="${BOLD}\e[1;32m"
-		RED="${BOLD}\e[1;31m"
-		YELLOW="${BOLD}\e[1;33m"
+		ALL_OFF="\e[0m"
+		BOLD="\e[1m"
+		BLUE="${BOLD}\e[34m"
+		GREEN="${BOLD}\e[32m"
+		RED="${BOLD}\e[31m"
+		YELLOW="${BOLD}\e[33m"
 	fi
 fi
 readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
 
 # override settings with an environment variable for batch processing
 BUILDDIR=${_BUILDDIR:-$BUILDDIR}
 BUILDDIR=${BUILDDIR:-$startdir} #default to $startdir if undefined
-- 
1.8.2



More information about the pacman-dev mailing list