diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-04 19:26:14 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 17:24:46 -0700 |
| commit | e3099b458b5c11742c1b88c27847801090870f2d (patch) | |
| tree | 7058cb1bfa4cd9ba53edcf9f5f231e9debb7c11d /scripts/fetchTool.ps1 | |
| parent | 0c0f68939e0d8367e55793f80f0000f2a43a812a (diff) | |
| download | vcpkg-e3099b458b5c11742c1b88c27847801090870f2d.tar.gz vcpkg-e3099b458b5c11742c1b88c27847801090870f2d.zip | |
Use 7zip920 instead of 7zr
Diffstat (limited to 'scripts/fetchTool.ps1')
| -rw-r--r-- | scripts/fetchTool.ps1 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 05335c724..e46c7808d 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -48,8 +48,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { Write-Host "Downloading $tool..." - # 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") + # aria2 needs 7zip & 7zip920 to extract. So, we need to download those trough powershell + if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zip920") { vcpkgDownloadFile $url $downloadPath } @@ -69,10 +69,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if ($isArchive) { Write-Host "Extracting $tool..." - if ($tool -eq "7zip") + if ($tool -eq "7zip920") { - $sevenZipR = fetchToolInternal "7zr" - $ec = vcpkgInvokeCommand "$sevenZipR" "x `"$downloadPath`" -o`"$toolPath`" -y" + vcpkgExtractZipFileWithShell -ArchivePath $downloadPath -DestinationDir $toolPath + } + elseif ($tool -eq "7zip") + { + $sevenZip920 = fetchToolInternal "7zip920" + $ec = vcpkgInvokeCommand "$sevenZip920" "x `"$downloadPath`" -o`"$toolPath`" -y" if ($ec -ne 0) { Write-Host "Could not extract $downloadPath" |
