diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-03 22:15:17 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 17:24:45 -0700 |
| commit | 54c68da907e4881d29e8017e085e6786e1c34ace (patch) | |
| tree | e45160ad783ed485e44ae61e33094e6b66e79b56 /scripts/fetchTool.ps1 | |
| parent | 31377dee20dad9b95357934732996e2448f2eaf5 (diff) | |
| download | vcpkg-54c68da907e4881d29e8017e085e6786e1c34ace.tar.gz vcpkg-54c68da907e4881d29e8017e085e6786e1c34ace.zip | |
Use aria2 to do downloads (other than aria2 itself, 7za and 7zr)
Diffstat (limited to 'scripts/fetchTool.ps1')
| -rw-r--r-- | scripts/fetchTool.ps1 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 315983841..05335c724 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -47,7 +47,18 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if (!(Test-Path $downloadPath)) { Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath + + # aria2 needs 7zip & 7zr to extract. So, we need to download those trough powershell + if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zr") + { + vcpkgDownloadFile $url $downloadPath + } + else + { + $aria2exe = fetchToolInternal "aria2" + vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath + } + Write-Host "Downloading $tool... done." } |
