Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 531704 | Differences between
and this patch

Collapse All | Expand All

(-)bashrc-r1 (-9 / +7 lines)
Lines 1-4 Link Here
1
# /etc/bash/bashrc
1
# @GENTOO_PORTAGE_EPREFIX@/etc/bash/bashrc
2
#
2
#
3
# This file is sourced by all *interactive* bash shells on startup,
3
# This file is sourced by all *interactive* bash shells on startup,
4
# including some apparently interactive shells such as scp and rcp
4
# including some apparently interactive shells such as scp and rcp
Lines 48-54 Link Here
48
safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
48
safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM
49
match_lhs=""
49
match_lhs=""
50
[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
50
[[ -f ~/.dir_colors   ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
51
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
51
[[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(<"@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS)"
52
[[ -z ${match_lhs}    ]] \
52
[[ -z ${match_lhs}    ]] \
53
	&& type -P dircolors >/dev/null \
53
	&& type -P dircolors >/dev/null \
54
	&& match_lhs=$(dircolors --print-database)
54
	&& match_lhs=$(dircolors --print-database)
Lines 56-67 Link Here
56
56
57
if ${use_color} ; then
57
if ${use_color} ; then
58
	# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
58
	# Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
59
	if type -P dircolors >/dev/null ; then
59
	if [[ -f ~/.dir_colors ]] ; then
60
		if [[ -f ~/.dir_colors ]] ; then
60
		eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b ~/.dir_colors);
61
			eval $(dircolors -b ~/.dir_colors)
61
	elif [[ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS ]] ; then
62
		elif [[ -f /etc/DIR_COLORS ]] ; then
62
		eval $("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/dircolors -b "@GENTOO_PORTAGE_EPREFIX@"/etc/DIR_COLORS)
63
			eval $(dircolors -b /etc/DIR_COLORS)
64
		fi
65
	fi
63
	fi
66
64
67
	if [[ ${EUID} == 0 ]] ; then
65
	if [[ ${EUID} == 0 ]] ; then
Lines 84-90 Link Here
84
	fi
82
	fi
85
fi
83
fi
86
84
87
for sh in /etc/bash/bashrc.d/* ; do
85
for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/bash/bashrc.d/* ; do
88
	[[ -r ${sh} ]] && source "${sh}"
86
	[[ -r ${sh} ]] && source "${sh}"
89
done
87
done
90
88

Return to bug 531704