Browse Source
Fix file loss during download (#10779)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
pull/10822/head
ERIK
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
1 deletions
-
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 |
|
|
|