Skip to content

Instantly share code, notes, and snippets.

@bdaniel7
Forked from lkaczanowski/Install.ps1
Created February 9, 2017 15:10
Show Gist options
  • Save bdaniel7/6e039d48fc091a5087b54dbadaa073ee to your computer and use it in GitHub Desktop.
Save bdaniel7/6e039d48fc091a5087b54dbadaa073ee 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