[pbuilder] 01/02: use USECOLORS as documented, rather than COLORS
Mattia Rizzolo
mattia at debian.org
Sun Jul 24 18:39:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch colors
in repository pbuilder.
commit a00000abf3ef8c5c068d629acaf635e9290c5a9f
Author: Mattia Rizzolo <mattia at debian.org>
Date: Sun Jul 24 18:38:31 2016 +0000
use USECOLORS as documented, rather than COLORS
---
pbuilder-modules | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pbuilder-modules b/pbuilder-modules
index 2f9fa6d..0cd4aa9 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -98,13 +98,13 @@ EOF
# I: informational message
_log() {
set -u
- term_supports_colors # defines COLORS
+ term_supports_colors # defines USECOLORS if not already set
local color="$1" ; shift
local red='\033[0;31m'
local yellow='\033[1;33m'
local blue='\033[0;34m'
local reset='\033[0m'
- case "$COLORS" in
+ case "$USECOLORS" in
yes)
printf "${!color}${*}${reset}\n"
;;
@@ -112,7 +112,7 @@ _log() {
printf "${*}\n"
;;
*)
- printf "malformed value of COLORS: [%s]\n" "$COLORS" >&2
+ printf "malformed value of USECOLORS: [%s]\n" "$USECOLORS" >&2
exit 1
;;
esac
@@ -173,8 +173,8 @@ _contains() {
}
term_supports_colors() {
- if [ -z ${COLORS:-} ] || [ "$COLORS" = "auto" ]; then
- [ $(tput colors) -ge 8 ] && COLORS=yes || COLORS=no
+ if [ -z ${USECOLORS:-} ] || [ "$USECOLORS" = "auto" ]; then
+ [ $(tput colors) -ge 8 ] && USECOLORS=yes || USECOLORS=no
fi
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list