Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (31 sloc) 0.887 kB
# General Utility Functions
function Coalesce-Args {
$result = $null
foreach($arg in $args) {
if ($arg -is [ScriptBlock]) {
$result = & $arg
} else {
$result = $arg
}
if ($result) { break }
}
$result
}
Set-Alias ?? Coalesce-Args -Force
function Get-LocalOrParentPath($path) {
$checkIn = Get-Item .
while ($checkIn -ne $NULL) {
$pathToTest = [System.IO.Path]::Combine($checkIn.fullname, $path)
if (Test-Path $pathToTest) {
return $pathToTest
} else {
$checkIn = $checkIn.parent
}
}
return $null
}
function dbg ($Message, [Diagnostics.Stopwatch]$Stopwatch) {
if($Stopwatch) {
Write-Verbose ('{0:00000}:{1}' -f $Stopwatch.ElapsedMilliseconds,$Message) -Verbose # -ForegroundColor Yellow
}
}
Jump to Line
Something went wrong with that request. Please try again.