Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 248487
Collapse All | Expand All

(-)ORIG-profile.eselect (-5 / +8 lines)
Lines 81-93 Link Here
81
}
81
}
82
82
83
do_show() {
83
do_show() {
84
	write_list_start "Current make.profile symlink:"
84
	write_list_start "Current make.profile symlink:"
85
	if [[ -L "${ROOT}/etc/make.profile" ]] ; then
85
	if [[ -L "${ROOT}/etc/make.profile" ]] ; then
86
		local link=$(canonicalise ${ROOT}/etc/make.profile)
86
		local link=$(canonicalise "${ROOT}/etc/make.profile")
87
		local portdir=$(portageq portdir)
87
		local portdir=$(portageq portdir)
88
		link=${link##..${ROOT}/${portdir}/profiles/}
88
		local profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
89
		link=${link##${profiledir}/}
89
		write_kv_list_entry "${link}" ""
90
		write_kv_list_entry "${link}" ""
90
	else
91
	else
91
		write_kv_list_entry "(unset)" ""
92
		write_kv_list_entry "(unset)" ""
92
	fi
93
	fi
93
}
94
}
Lines 97-113 Link Here
97
describe_list() {
98
describe_list() {
98
	echo "List available profile symlink targets"
99
	echo "List available profile symlink targets"
99
}
100
}
100
101
101
do_list() {
102
do_list() {
102
	local active targets
103
	local portdir profiledir active targets
103
	targets=( $(find_targets) )
104
	targets=( $(find_targets) )
104
105
105
	[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles"
106
	[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles"
106
107
107
	active=$(canonicalise ${ROOT}/etc/make.profile)
108
	portdir=$(portageq portdir)
108
	active=${active##*profiles/}
109
	profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
110
	active=$(canonicalise "${ROOT}/etc/make.profile")
111
	active=${active##${profiledir}/}
109
	if [[ -n ${targets[@]} ]] ; then
112
	if [[ -n ${targets[@]} ]] ; then
110
		local i
113
		local i
111
		for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
114
		for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
112
			[[ ${targets[${i}]} == ${active} ]] \
115
			[[ ${targets[${i}]} == ${active} ]] \
113
				&& targets[${i}]="${targets[${i}]} $(highlight '*' )"
116
				&& targets[${i}]="${targets[${i}]} $(highlight '*' )"

Return to bug 248487