From c8cdc0c157c860ee15d5b9911b2649e5fad132d9 Mon Sep 17 00:00:00 2001 From: Michael LeMay Date: Fri, 10 Jul 2015 13:41:24 -0700 Subject: [PATCH] galileo: Check for errors after downloading newlib tarball Repeat the file existence and MD5 checks in build_newlib.sh after the newlib tarball is downloaded and exit if either of the checks fail. --- platform/galileo/bsp/libc/build_newlib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/galileo/bsp/libc/build_newlib.sh b/platform/galileo/bsp/libc/build_newlib.sh index baf2cab93..a752c4ffb 100755 --- a/platform/galileo/bsp/libc/build_newlib.sh +++ b/platform/galileo/bsp/libc/build_newlib.sh @@ -16,6 +16,10 @@ prepare() { if [ ! -e ./${TARBALL} ] || [ "$(md5sum ./${TARBALL} | cut -d' ' -f1)" != $MD5 ]; then wget -c ftp://sources.redhat.com/pub/newlib/${TARBALL} fi + if [ ! -e ./${TARBALL} ] || [ "$(md5sum ./${TARBALL} | cut -d' ' -f1)" != $MD5 ]; then + echo "Error obtaining tarball." + exit 1 + fi # Clean up the previous source dir, if any. if [[ -d ./newlib-${VERSION} ]]; then