[coreboot-gerrit] New patch to review for coreboot: buildgcc: Show the exit status of wget if downloading fails.

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Mon Aug 31 06:57:44 CEST 2015


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11472

-gerrit

commit 77bace3bc92f5f4af81b2560d1632206c06019d5
Author: zbao <fishbaozi at gmail.com>
Date:   Sun Aug 30 23:35:16 2015 -0400

    buildgcc: Show the exit status of wget if downloading fails.
    
    Change-Id: Ie3a44c6db9c9c186c52b4743334266ec5411ba8a
    Signed-off-by: Zheng Bao <zheng.bao at amd.com>
    Signed-off-by: Zheng Bao <fishbaozi at gmail.com>
---
 util/crossgcc/buildgcc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f4522ed..49e41e5 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"



More information about the coreboot-gerrit mailing list