Skip to content

Commit

Permalink
Fix file loss during download (kubernetes-sigs#10779)
Browse files Browse the repository at this point in the history
Signed-off-by: bo.jiang <[email protected]>
  • Loading branch information
ErikJiang authored and pedromcpedro committed May 8, 2024
1 parent 7fb3d4f commit d6df6df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contrib/offline/manage-offline-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6df6df

Please sign in to comment.