Created
August 16, 2011 20:33
-
-
Save vansha/1150094 to your computer and use it in GitHub Desktop.
Download all packages for the solution via NuGet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scriptDir = split-path $script:MyInvocation.MyCommand.Path | |
$nuget = "$scriptDir\tools\NuGet.exe" | |
$packagesDir = "$scriptDir\src\Packages" | |
$packagesConfigs = get-content "$packagesDir\repositories.config" ` | |
| select-string -pattern "<repository path=" ` | |
| foreach { $_ -replace "\s*<repository path=""", """$packagesDir\" } ` | |
| foreach { $_ -replace "\s*/>" } | |
foreach ($pathToPackagesConfig in $packagesConfigs) | |
{ | |
& $nuget install $pathToPackagesConfig -o $packagesDir | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment