PowerShell/test/powershell/Test-Common.ps1

23 lines
306 B
PowerShell
Raw Normal View History

2015-11-10 17:41:54 +01:00
Function IsWindows
{
$pingCommand = Get-Command -CommandType Application ping
2016-02-05 23:57:08 +01:00
if ($pingCommand.Definition.IndexOf("\") -ne -1)
2015-11-10 17:41:54 +01:00
{
return 1;
}
return 0;
}
Function GetTempDir
{
if (IsWindows)
{
return $env:TEMP
}
else
{
return "/tmp"
2015-11-10 17:41:54 +01:00
}
}