From b430db8187bf4a843fe9a218be40d70cc1151e04 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 13 Feb 2014 15:11:30 -0800 Subject: [PATCH] build.sh: Die with an error if a wget fails --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index a291782..30286f7 100755 --- a/build.sh +++ b/build.sh @@ -110,7 +110,8 @@ import_stage3() for FILE in "${STAGE3}" "${STAGE3_CONTENTS}" "${STAGE3_DIGESTS}"; do if [ ! -f "downloads/${FILE}" ]; then - wget -O "downloads/${FILE}" "${ARCH_URL}${FILE}" + wget -O "downloads/${FILE}" "${ARCH_URL}${FILE}" || + die "failed to download ${ARCH_URL}${FILE}" fi done @@ -144,7 +145,8 @@ import_portage() for FILE in "${PORTAGE}" "${PORTAGE_SIG}"; do if [ ! -f "downloads/${FILE}" ]; then - wget -O "downloads/${FILE}" "${PORTAGE_URL}${FILE}" + wget -O "downloads/${FILE}" "${PORTAGE_URL}${FILE}" || + die "failed to download ${PORTAGE_URL}${FILE}" fi done -- 2.26.2