Skip to content

Instantly share code, notes, and snippets.

@lkaczanowski
Created February 21, 2014 10:14
Show Gist options
  • Save lkaczanowski/9131893 to your computer and use it in GitHub Desktop.
Save lkaczanowski/9131893 to your computer and use it in GitHub Desktop.
Nuget install script - copy folder from package to other directory
param($installPath, $toolsPath, $package, $project)
$projectFullName = $project.FullName
Write-Host "Copying Docs folder to the root of the solution: $projectFullName"
$fileInfo = new-object -typename System.IO.FileInfo -ArgumentList $projectFullName
$projectDirectory = $fileInfo.DirectoryName
$sourceDirectory = "$installPath\docs"
Write-Host $sourceDirectory
$destinationDirectory = "$projectDirectory\..\..\docs"
Write-Host $destinationDirectory
if(test-path $sourceDirectory -pathtype container)
{
Write-Host "Copying files from $sourceDirectory to $destinationDirectory"
robocopy $sourceDirectory $destinationDirectory /e /XO
}
Write-Host "Copying complete. $projectFullName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment