summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-12 02:44:24 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-12 02:44:24 +0000
commit191ef888f86d443e8b10505d0d9876eb91dc065f (patch)
tree8a7528dff7cc20b2cd309f97f94c214748c5d41d /bin
parenta832a5ea8b5c7ff34ebf1a6bd87f5dc3dd58041a (diff)
downloadportage-191ef888f86d443e8b10505d0d9876eb91dc065f.tar.gz
portage-191ef888f86d443e8b10505d0d9876eb91dc065f.tar.bz2
portage-191ef888f86d443e8b10505d0d9876eb91dc065f.zip
Fix ebuild environment color.map support so that it works properly through exec calls (since the color variables can not be directly exported due to env pollution).
svn path=/main/trunk/; revision=5578
Diffstat (limited to 'bin')
-rw-r--r--bin/isolated-functions.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 5b2c82f7c..5aa838ba9 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -209,16 +209,18 @@ set_colors() {
ENDCOL=$'\e[A\e['${COLS}'C' # Now, ${ENDCOL} will move us to the end of the
# column; irregardless of character width
-
- [ -z "${GOOD}" ] && GOOD=$'\e[32;01m'
- [ -z "${WARN}" ] && WARN=$'\e[33;01m'
- [ -z "${BAD}" ] && BAD=$'\e[31;01m'
- [ -z "${HILITE}" ] && HILITE=$'\e[36;01m'
- [ -z "${BRACKET}" ] && BRACKET=$'\e[34;01m'
+ if [ -n "${PORTAGE_COLORMAP}" ] ; then
+ eval ${PORTAGE_COLORMAP}
+ else
+ GOOD=$'\e[32;01m'
+ WARN=$'\e[33;01m'
+ BAD=$'\e[31;01m'
+ HILITE=$'\e[36;01m'
+ BRACKET=$'\e[34;01m'
+ fi
NORMAL=$'\e[0m'
}
-export -n GOOD WARN BAD HILITE BRACKET
RC_ENDCOL="yes"
RC_INDENTATION=''
RC_DEFAULT_INDENT=2