[coreboot-gerrit] New patch to review for coreboot: buildgcc: improve portability of 'type' use

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Jun 11 21:09:04 CEST 2015

Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10517


commit 93c8c5e0444c2ab484a4e3164ef79c2ed4eda6d3
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Thu Jun 11 21:04:31 2015 +0200

    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
    Let's simply assume there's no build_$OneOfOurPackages commands around that
    could also match.
    Change-Id: I44f021243149701e8da9dd74c368ca2ad4509419
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Tested-on: linux bash, linux dash, solaris sh, solaris ksh.
 util/crossgcc/buildgcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 3bee6dc..ecc7ad4 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -235,7 +235,7 @@ unpack_and_patch() {
-	type $1 2>/dev/null | grep -q 'is a function'
+	type $1 >/dev/null 2>&1
 build() {

More information about the coreboot-gerrit mailing list