diff options
author | zbao <fishbaozi@gmail.com> | 2015-08-30 23:35:16 -0400 |
---|---|---|
committer | Zheng Bao <zheng.bao@amd.com> | 2015-08-31 06:45:13 +0000 |
commit | d22b9ea1cbc0e23eb2b30a48c0ed8d807a337df2 (patch) | |
tree | c62e31b9122779f63fd8571c81ef6beea1a3e8df /util | |
parent | ff3f15cd4dcd631e982332c9912a07c28ee42def (diff) | |
download | coreboot-d22b9ea1cbc0e23eb2b30a48c0ed8d807a337df2.tar.xz |
buildgcc: Show the exit status of wget if downloading fails.
Change-Id: Ie3a44c6db9c9c186c52b4743334266ec5411ba8a
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/11472
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/crossgcc/buildgcc | 10 |
1 files changed, 7 insertions, 3 deletions
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" |