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

Collapse All | Expand All

(-)./gcc-config (-14 / +5 lines)
Lines 50-73 Link Here
50
	usage
50
	usage
51
fi
51
fi
52
52
53
HAVE_WHICH="no"
54
if [ -n "$(which which 2> /dev/null)" ]
55
then
56
	HAVE_WHICH="yes"
57
fi
58
59
find_path() {
53
find_path() {
60
	[ -z "$1" ] && return 0
54
	[ -z "$1" ] && return 0
61
55
62
	if [ "${HAVE_WHICH}" = "yes" ]
56
	local fullpath="$(type -P $1)"
57
	
58
	if [ -x "${fullpath}" ]
63
	then
59
	then
64
		local fullpath="$(which $1 2> /dev/null)"
60
		echo "${fullpath}"
65
		
61
		return 0
66
		if [ -x "${fullpath}" ]
67
		then
68
			echo "${fullpath}"
69
			return 0
70
		fi
71
	fi
62
	fi
72
63
73
	for x in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin
64
	for x in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin

Return to bug 55262