We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79c82f0 commit e6ee302Copy full SHA for e6ee302
tools/download_files.sh
@@ -31,7 +31,12 @@ pushd $OUT_DIR
31
for FNAME in "$@"; do
32
echo -n "Downloading ${FNAME}..."
33
if [[ ! -e "${FNAME}" ]]; then
34
- curl --silent --show-error --remote-name "${BASEURL}/${FNAME}"
+ HTTP_CODE=$(curl --silent --show-error -w '%{http_code}' --remote-name "${BASEURL}/${FNAME}")
35
+ if [[ "${HTTP_CODE}" != "200" ]]; then
36
+ echo "There was an error retrieving file '${FNAME}'. HTTP response was ${HTTP_CODE}" 1>&2
37
+ rm -f ${FNAME}
38
+ exit 3
39
+ fi
40
echo "done"
41
else
42
echo "file already present"
0 commit comments