View | Details | Raw Unified
Collapse All | Expand All

(-) ./gcc-config (-14 / +5 lines)
 Lines 50-73    Link Here 
	usage
	usage
fi
fi
HAVE_WHICH="no"
if [ -n "$(which which 2> /dev/null)" ]
then
	HAVE_WHICH="yes"
fi
find_path() {
find_path() {
	[ -z "$1" ] && return 0
	[ -z "$1" ] && return 0
	if [ "${HAVE_WHICH}" = "yes" ]
	local fullpath="$(type -path $1)"
	
	if [ -x "${fullpath}" ]
	then
	then
		local fullpath="$(which $1 2> /dev/null)"
		echo "${fullpath}"
		
		return 0
		if [ -x "${fullpath}" ]
		then
			echo "${fullpath}"
			return 0
		fi
	fi
	fi
	for x in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin
	for x in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin