Adding backup for xerces-c library
This commit is contained in:
parent
2f739238e4
commit
f628f204b4
|
@ -454,6 +454,12 @@ else
|
|||
log "Retrieving xerces-c."
|
||||
wget ${XERCESC_REPO}
|
||||
|
||||
# try to use the backup boost we have in Jenkins
|
||||
if [[ ! -f "${XERCESC_BASENAME}.tar.gz" ]] ; then
|
||||
log "Using xerces backup"
|
||||
wget "https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/${XERCESC_BASENAME}.tar.gz" || true
|
||||
fi
|
||||
|
||||
log "Extracting xerces-c."
|
||||
tar -xzf ${XERCESC_BASENAME}.tar.gz
|
||||
mv ${XERCESC_BASENAME} ${XERCESC_SRC_DIR}
|
||||
|
|
|
@ -52,6 +52,7 @@ rem ../xerces-c-x.x.x-src.zip
|
|||
set XERCESC_TEMP_FILE_DIR=%BUILD_DIR%%XERCESC_TEMP_FILE%
|
||||
|
||||
set XERCESC_REPO=https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip
|
||||
set XERCESC_BACKUP_REPO=https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/xerces-c-%XERCESC_VERSION%.zip
|
||||
|
||||
rem ../xerces-c-x.x.x-source/
|
||||
set XERCESC_SRC_DIR=%BUILD_DIR%%XERCESC_BASENAME%-%XERCESC_VERSION%-source\
|
||||
|
@ -73,8 +74,7 @@ if not exist "%XERCESC_SRC_DIR%" (
|
|||
)
|
||||
if not exist "%XERCESC_TEMP_FILE_DIR%" (
|
||||
echo %FILE_N% Using %XERCESC_BASENAME% from backup.
|
||||
goto error_download
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/xerces-c-%XERCESC_VERSION%-src.zip', '%XERCESC_TEMP_FILE_DIR%')"
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%XERCESC_BACKUP_REPO%', '%XERCESC_TEMP_FILE_DIR%')"
|
||||
)
|
||||
if %errorlevel% neq 0 goto error_download
|
||||
rem Extract the downloaded library
|
||||
|
|
|
@ -71,12 +71,12 @@ if not exist "%ZLIB_SRC_DIR%" (
|
|||
if not exist "%ZLIB_TEMP_FILE_DIR%" (
|
||||
echo %FILE_N% Retrieving %ZLIB_BASENAME%.
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%ZLIB_REPO%', '%ZLIB_TEMP_FILE_DIR%')"
|
||||
if %errorlevel% == 0 (
|
||||
echo %FILE_N% Retrieving %ZLIB_BASENAME% from backup.
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%ZLIB_BACKUP_REPO%', '%ZLIB_TEMP_FILE_DIR%')"
|
||||
)
|
||||
if %errorlevel% neq 0 goto error_download
|
||||
)
|
||||
if not exist "%ZLIB_TEMP_FILE_DIR%" (
|
||||
echo %FILE_N% Retrieving %ZLIB_BASENAME% from backup.
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%ZLIB_BACKUP_REPO%', '%ZLIB_TEMP_FILE_DIR%')"
|
||||
)
|
||||
if %errorlevel% neq 0 goto error_download
|
||||
rem Extract the downloaded library
|
||||
echo %FILE_N% Extracting zlib from "%ZLIB_TEMP_FILE%".
|
||||
powershell -Command "Expand-Archive '%ZLIB_TEMP_FILE_DIR%' -DestinationPath '%BUILD_DIR%'"
|
||||
|
|
Loading…
Reference in New Issue