Access files through https

This commit is contained in:
Ruben Abad 2024-01-28 21:57:34 +01:00
parent cf89f8ac72
commit f3d7dd080d
2 changed files with 6 additions and 3 deletions

View File

@ -19,7 +19,7 @@ for /F "delims=" %%a in (%CONTENT_VERSIONS%) do (
set "lastLine=%%a" set "lastLine=%%a"
) )
set CONTENT_ID=%lastLine:~-16,16% set CONTENT_ID=%lastLine:~-16,16%
set CONTENT_LINK=http://carla-assets.s3.us-east-005.backblazeb2.com/%CONTENT_ID%.tar.gz set CONTENT_LINK=https://carla-assets.s3.us-east-005.backblazeb2.com/%CONTENT_ID%.tar.gz
if "%CONTENT_ID:~0,2%"=="20" ( if "%CONTENT_ID:~0,2%"=="20" (
set CONTENT_FILE=%CONTENT_FOLDER%/%CONTENT_ID%.tar.gz set CONTENT_FILE=%CONTENT_FOLDER%/%CONTENT_ID%.tar.gz
set CONTENT_FILE_TAR=%CONTENT_FOLDER%/%CONTENT_ID%.tar set CONTENT_FILE_TAR=%CONTENT_FOLDER%/%CONTENT_ID%.tar

View File

@ -41,13 +41,16 @@ done
# -- Set up environment -------------------------------------------------------- # -- Set up environment --------------------------------------------------------
# ============================================================================== # ==============================================================================
MAX_PARALLELL_DOWNLOADS=1
MAX_CONNECTIONS_PER_SERVER=1
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null pushd "$SCRIPT_DIR" >/dev/null
CONTENT_FOLDER="${SCRIPT_DIR}/Unreal/CarlaUE4/Content/Carla" CONTENT_FOLDER="${SCRIPT_DIR}/Unreal/CarlaUE4/Content/Carla"
CONTENT_ID=$(tac $SCRIPT_DIR/Util/ContentVersions.txt | egrep -m 1 . | rev | cut -d' ' -f1 | rev) CONTENT_ID=$(tac $SCRIPT_DIR/Util/ContentVersions.txt | egrep -m 1 . | rev | cut -d' ' -f1 | rev)
CONTENT_LINK=http://carla-assets.s3.us-east-005.backblazeb2.com/${CONTENT_ID}.tar.gz CONTENT_LINK=https://carla-assets.s3.us-east-005.backblazeb2.com/${CONTENT_ID}.tar.gz
VERSION_FILE="${CONTENT_FOLDER}/.version" VERSION_FILE="${CONTENT_FOLDER}/.version"
@ -60,7 +63,7 @@ function download_content {
mkdir -p Content mkdir -p Content
if hash aria2c 2>/dev/null; then if hash aria2c 2>/dev/null; then
echo -e "${CONTENT_LINK}\n\tout=Content.tar.gz" > .aria2c.input echo -e "${CONTENT_LINK}\n\tout=Content.tar.gz" > .aria2c.input
aria2c -j16 -x16 --input-file=.aria2c.input aria2c -j${MAX_PARALLELL_DOWNLOADS} -x${MAX_CONNECTIONS_PER_SERVER} --input-file=.aria2c.input
rm -f .aria2c.input rm -f .aria2c.input
else else
wget -c ${CONTENT_LINK} -O Content.tar.gz wget -c ${CONTENT_LINK} -O Content.tar.gz