buildgcc: improve portability of 'type' use

The precise phrase returned by 'type' differs between locales and shells.
It also doesn't matter because it returns an error code when it hasn't found a
match.
Let's simply assume there's no build_$OneOfOurPackages commands around that
could also match.

Change-Id: I44f021243149701e8da9dd74c368ca2ad4509419
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Tested-on: linux bash, linux dash, solaris sh, solaris ksh.
Reviewed-on: http://review.coreboot.org/10517
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2015-06-11 21:04:31 +02:00 committed by Patrick Georgi
parent fe5dd02c83
commit c866591698
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ unpack_and_patch() {
fn_exists()
{
type $1 2>/dev/null | grep -q 'is a function'
type $1 >/dev/null 2>&1
}
is_package_enabled()