mirror of
https://github.com/actions/runner-images.git
synced 2025-12-29 13:17:53 +08:00
[Mac OS] Rewrite function download_with_retry (#8914)
* [Mac OS] Rewrite function download_with_retry * Update powershell function DownloadWithRetry
This commit is contained in:
committed by
GitHub
parent
bf202afb1e
commit
5f5ab19246
@@ -8,19 +8,14 @@ source ~/utils/utils.sh
|
||||
arch=$(get_arch)
|
||||
|
||||
# Check MacOS architecture and if ARM install using brew
|
||||
if [ $arch == "arm64" ]; then
|
||||
if [ "$arch" == "arm64" ]; then
|
||||
brew_smart_install azcopy
|
||||
else
|
||||
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
|
||||
|
||||
download_with_retries $AZCOPY_DOWNLOAD_URL "/tmp" "azcopy.zip"
|
||||
unzip /tmp/azcopy.zip -d azcopy
|
||||
AZCOPY_EXTRACTED=$(echo azcopy/azcopy*)
|
||||
cp "$AZCOPY_EXTRACTED/azcopy" "/usr/local/bin/azcopy"
|
||||
archive_path=$(download_with_retry "https://aka.ms/downloadazcopy-v10-mac")
|
||||
unzip -qq "$archive_path" -d /tmp/azcopy
|
||||
extract_path=$(echo /tmp/azcopy/azcopy*)
|
||||
cp "$extract_path/azcopy" "/usr/local/bin/azcopy"
|
||||
chmod +x "/usr/local/bin/azcopy"
|
||||
|
||||
echo "Done, cleaning up"
|
||||
rm -rf azcopy*
|
||||
fi
|
||||
|
||||
invoke_tests "Common" "AzCopy"
|
||||
|
||||
Reference in New Issue
Block a user