summaryrefslogtreecommitdiff
path: root/util/crossgcc
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2016-08-05 13:41:51 +0800
committerPatrick Georgi <pgeorgi@google.com>2016-08-11 15:14:53 +0200
commitbb003c8126f7b6de3651661535e9400ab4e9117b (patch)
treee6c69d7ac9c56e4311a209c6cafb7a1a273c7217 /util/crossgcc
parenta7a9c463fd4cecd4152868fdd760030bf8970e43 (diff)
downloadcoreboot-bb003c8126f7b6de3651661535e9400ab4e9117b.tar.xz
buildgcc: printf no-color before quiting
On some kind of terms (shell in emacs), the color-ctrl letters don't work. The backspaces can not delete correct number of letters. So we don't print color-ctrl letters in loop. Change-Id: I1f1729095e8968a9344ed9f1f278f7c78f7110e9 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/16066 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 3f5f562adc..86e952ca3a 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -219,10 +219,9 @@ download_showing_percentage() {
url=$1
printf " ..${red} 0%%"
wget --no-check-certificate $url 2>&1 | while read line; do
- printf "${red}"
echo $line | grep -o "[0-9]\+%" | awk '{printf("\b\b\b\b%4s", $1)}'
- printf "${NC}"
done
+ printf "${NC}"
}
download() {
@@ -351,6 +350,12 @@ build()
fi
}
+quit()
+{
+ printf "${NC}Stop\n"
+ exit 1
+}
+
cleanup()
{
if [ $SAVETEMPS -ne 0 ]; then
@@ -673,6 +678,8 @@ print_stable() {
esac
}
+trap quit 1 2 3 15
+
# Look if we have getopt. If not, build it.
export PATH=$PATH:.
getopt - > /dev/null 2>/dev/null || gcc -o getopt getopt.c