Meta: Download TZDB data with fallible download function

This commit is contained in:
Timothy Flynn 2022-01-25 18:40:08 -05:00 committed by Linus Groh
parent c7ef86f5d9
commit 931302c500
Notes: sideshowbarker 2024-07-17 20:12:43 +09:00

View File

@ -48,11 +48,7 @@ endfunction()
if (ENABLE_TIME_ZONE_DATABASE_DOWNLOAD)
remove_path_if_version_changed("${TZDB_VERSION}" "${TZDB_VERSION_FILE}" "${TZDB_PATH}")
if (NOT EXISTS "${TZDB_ZIP_PATH}")
message(STATUS "Downloading time zone database from ${TZDB_ZIP_URL}...")
file(DOWNLOAD "${TZDB_ZIP_URL}" "${TZDB_ZIP_PATH}" INACTIVITY_TIMEOUT 10)
endif()
download_file("${TZDB_ZIP_URL}" "${TZDB_ZIP_PATH}")
extract_tzdb_file("${TZDB_AFRICA_SOURCE}" "${TZDB_AFRICA_PATH}")
extract_tzdb_file("${TZDB_ANTARCTICA_SOURCE}" "${TZDB_ANTARCTICA_PATH}")
extract_tzdb_file("${TZDB_ASIA_SOURCE}" "${TZDB_ASIA_PATH}")