Fix file loss during download (#10779)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>pull/10822/head
parent
df5a06dc70
commit
fe819a6ec3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue