diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-24 12:30:14 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-24 12:30:14 -0800 |
| commit | d5e7a501e907f06ad1e8bb4ffdebce9a29179d2d (patch) | |
| tree | af0681e7ebdb12e9481e8f4003c2aafe5db82b1b /scripts/fetchDependency.ps1 | |
| parent | ccda20a8584a9fcc89c4dd631e5ef8d4189f1131 (diff) | |
| download | vcpkg-d5e7a501e907f06ad1e8bb4ffdebce9a29179d2d.tar.gz vcpkg-d5e7a501e907f06ad1e8bb4ffdebce9a29179d2d.zip | |
Download nuget.exe in a version-including subfolder in Downloads\
Diffstat (limited to 'scripts/fetchDependency.ps1')
| -rw-r--r-- | scripts/fetchDependency.ps1 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 9269dba8c..d05d16bea 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -133,9 +133,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "3.3.0" $downloadVersion = "3.5.0" $url = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe" - $downloadPath = "$downloadsDir\nuget.exe" + $downloadPath = "$downloadsDir\nuget-3.5.0\nuget.exe" $expectedDownloadedFileHash = "399ec24c26ed54d6887cde61994bb3d1cada7956c1b19ff880f06f060c039918" - $executableFromDownload = "$downloadsDir\nuget.exe" + $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } elseif($Dependency -eq "git") @@ -155,6 +155,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } + $downloadSubdir = Split-path $downloadPath -Parent + if (!(Test-Path $downloadSubdir)) + { + New-Item -ItemType Directory -Path $downloadSubdir | Out-Null + } + performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash |
