Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Created October 24, 2011 08:01
Show Gist options
  • Save ferventcoder/1308558 to your computer and use it in GitHub Desktop.
Save ferventcoder/1308558 to your computer and use it in GitHub Desktop.
xunitContrib resharper "installer"
try {
$toolsDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
$topDir = Split-Path -parent $toolsDir
$resharperPluginDir = Join-Path $topDir 'rs60\plugins'
$processor = Get-WmiObject Win32_Processor
$is64bit = $processor.AddressWidth -eq 64
$progFiles = [System.Environment]::GetFolderPath('ProgramFiles')
if ($is64bit) {$progFiles = "$progFiles (x86)"}
$resharperTarget = Join-Path $progFiles "JetBrains\ReSharper\v6.0\Bin\plugins\xunitcontrib.runner.resharper.6.0"
if (![System.IO.Directory]::Exists($resharperTarget)) {[System.IO.Directory]::CreateDirectory($resharperTarget)}
Write-Host "Copying the contents of `'$resharperPluginDir`' to `'$resharperTarget`'."
Copy-Item "$resharperPluginDir\*" $resharperTarget –recurse -force
Write-ChocolateySuccess 'xunitcontrib'
} catch {
Write-ChocolateyFailure 'xunitcontrib' "$($_.exception.message)"
throw
}
@ferventcoder
Copy link
Author

This is with chocolateyInstall.ps1 in a tools directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment