fwupdate: show curl log upon download error

This commit is contained in:
Calin Crisan 2019-10-01 23:29:25 +03:00
parent 01a63e7fd8
commit 83714c767f

View File

@ -291,12 +291,16 @@ function do_download() {
curl ${curl_opts} -o ${outfile} "${url}" &> ${CURL_LOG_FILE} & curl ${curl_opts} -o ${outfile} "${url}" &> ${CURL_LOG_FILE} &
pid=$! pid=$!
echo ${pid} > ${CURL_PID_FILE} echo ${pid} > ${CURL_PID_FILE}
set +e # don't exit on error just yet
wait ${pid} wait ${pid}
if [[ "$?" != 0 ]]; then if [[ "$?" != 0 ]]; then
cat ${CURL_LOG_FILE} cat ${CURL_LOG_FILE}
exit 1 exit 1
fi fi
set -e
} }
function download_status() { function download_status() {