Skip to content

Instantly share code, notes, and snippets.

@markkemper1
Created July 24, 2012 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markkemper1/3169671 to your computer and use it in GitHub Desktop.
Save markkemper1/3169671 to your computer and use it in GitHub Desktop.
_PackageCopier.ps1
""
"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