Created
July 24, 2012 12:26
-
-
Save markkemper1/3169671 to your computer and use it in GitHub Desktop.
_PackageCopier.ps1
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
"" | |
"Package Copier Starting..........." | |
"" | |
if($args.length -ne 2) | |
{ | |
$source = resolve-path "..\..\packages" | |
$destination = resolve-path "..\..\_nuget_repository\" | |
} | |
else | |
{ | |
$source = $args[0] | |
$destination = $args[1] | |
} | |
if( -not (Test-Path -PathType Container $source)) | |
{ | |
throw "source directory does not exist, source: " + $source | |
} | |
if( -not (Test-Path -PathType Container $destination)) | |
{ | |
throw "Destination directory does not exist!! " + $destination | |
} | |
Get-ChildItem -Recurse -Filter "*.nupkg" $source ` | |
| Where-Object { -not( Test-Path -PathType Leaf (Join-Path $destination $_.Name)) } ` | |
| Copy-Item -Destination $destination -Verbose ` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment