aboutsummaryrefslogtreecommitdiff
path: root/scripts/fetchTool.ps1
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2018-04-03 22:15:17 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2018-04-06 17:24:45 -0700
commit54c68da907e4881d29e8017e085e6786e1c34ace (patch)
treee45160ad783ed485e44ae61e33094e6b66e79b56 /scripts/fetchTool.ps1
parent31377dee20dad9b95357934732996e2448f2eaf5 (diff)
downloadvcpkg-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.ps113
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."
}