summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-06-11 21:04:31 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-06-12 08:40:54 +0200
commitc8665916987e980d3b49b16e99365557068fa64f (patch)
tree2bf317a9da25d2063a2b02feacd17f2752aeb840 /util
parentfe5dd02c839fc1b857bcdb2cc85f0cf5befc0f00 (diff)
downloadcoreboot-c8665916987e980d3b49b16e99365557068fa64f.tar.gz
coreboot-c8665916987e980d3b49b16e99365557068fa64f.tar.bz2
coreboot-c8665916987e980d3b49b16e99365557068fa64f.zip
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>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 097907498547..7f440f73660b 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -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()