crossgcc: Fix colors with dash
authorPatrick Georgi <patrick@georgi-clan.de>
Fri, 28 Oct 2011 22:00:19 +0000 (00:00 +0200)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 30 Oct 2011 20:58:42 +0000 (21:58 +0100)
Ubuntu (and probably other distros) have dash as /bin/sh, which
doesn't display colors by itself. If /usr/bin/printf is found, it's
used instead of the internal printf to re-enable colors.

Change-Id: I3e6d413cd0c8a46ef91821d8c07e88166de58af4
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/352
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
util/crossgcc/buildgcc

index 40444a554125898ccc28987c88ed7efab9dad123..a298dbae668fb0fec543b91ac6ef54fa8231c6ae 100755 (executable)
 CROSSGCC_DATE="October 10th, 2011"
 CROSSGCC_VERSION="1.05"
 
+# To enable colors on dash(1)
+if [ -x /usr/bin/printf ]; then
+alias printf=/usr/bin/printf
+fi
+
 # default settings
 TARGETDIR=`pwd`/xgcc
 TARGETARCH=i386-elf