[Ubuntu] Rewrite function download_with_retry (#8912)

* [Ubuntu] Rewrite function download_with_retry

* Fix loop exit condition
This commit is contained in:
Vasilii Polikarpov
2023-11-29 20:25:29 +01:00
committed by GitHub
parent 7dba8776df
commit abb81511d4
37 changed files with 203 additions and 222 deletions

View File

@@ -42,10 +42,10 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do
echo "Downloading tar archive $PACKAGE_TAR_NAME"
DOWNLOAD_URL="https://github.com/ruby/ruby-builder/releases/download/toolcache/${PACKAGE_TAR_NAME}"
download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME
PACKAGE_ARCHIVE_PATH=$(download_with_retry "$DOWNLOAD_URL")
echo "Expand '$PACKAGE_TAR_NAME' to the '$RUBY_VERSION_PATH' folder"
tar xf "/tmp/$PACKAGE_TAR_NAME" -C $RUBY_VERSION_PATH
tar xf "$PACKAGE_ARCHIVE_PATH" -C $RUBY_VERSION_PATH
COMPLETE_FILE_PATH="$RUBY_VERSION_PATH/x64.complete"
if [ ! -f $COMPLETE_FILE_PATH ]; then