From d22b9ea1cbc0e23eb2b30a48c0ed8d807a337df2 Mon Sep 17 00:00:00 2001 From: zbao Date: Sun, 30 Aug 2015 23:35:16 -0400 Subject: buildgcc: Show the exit status of wget if downloading fails. Change-Id: Ie3a44c6db9c9c186c52b4743334266ec5411ba8a Signed-off-by: Zheng Bao Signed-off-by: Zheng Bao Reviewed-on: http://review.coreboot.org/11472 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/crossgcc/buildgcc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index f4522edcdd..49e41e537d 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -193,16 +193,20 @@ download() { FILE=$(basename $archive) printf " * $FILE " - test -f tarballs/$FILE && check_sum $FILE && printf "(cached)" || ( + if test -f tarballs/$FILE && check_sum $FILE ; then + printf "(cached)" + else printf "(downloading from $archive)" rm -f tarballs/$FILE cd tarballs wget --no-check-certificate -q $archive + wgetret=$? cd .. compute_sum $FILE - ) + fi + if [ ! -f tarballs/$FILE ]; then - printf "\n${RED}Failed to download $FILE.${NC}\n" + printf "\n${RED}Failed to download $FILE. Wget returns $wgetret. See 'man wget'.${NC}\n" exit 1 fi printf "\n" -- cgit v1.2.3