From fe819a6ec38743cb06217765947dd7cb246441ac Mon Sep 17 00:00:00 2001 From: ERIK Date: Mon, 22 Jan 2024 12:56:08 +0800 Subject: [PATCH] Fix file loss during download (#10779) Signed-off-by: bo.jiang --- contrib/offline/manage-offline-files.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/offline/manage-offline-files.sh b/contrib/offline/manage-offline-files.sh index 875bd5609..60c7928b4 100755 --- a/contrib/offline/manage-offline-files.sh +++ b/contrib/offline/manage-offline-files.sh @@ -17,7 +17,12 @@ rm -rf "${OFFLINE_FILES_DIR}" rm "${OFFLINE_FILES_ARCHIVE}" mkdir "${OFFLINE_FILES_DIR}" -wget -x -P "${OFFLINE_FILES_DIR}" -i "${FILES_LIST}" +while read -r url; do + if ! wget -x -P "${OFFLINE_FILES_DIR}" "${url}"; then + exit 1 + fi +done < "${FILES_LIST}" + tar -czvf "${OFFLINE_FILES_ARCHIVE}" "${OFFLINE_FILES_DIR_NAME}" [ -n "$NO_HTTP_SERVER" ] && echo "skip to run nginx" && exit 0