mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
fwupdate: show curl log upon download error
This commit is contained in:
parent
01a63e7fd8
commit
83714c767f
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user