2015-11-10 08:41:54 -08:00
|
|
|
Function IsWindows
|
|
|
|
|
{
|
|
|
|
|
$pingCommand = Get-Command -CommandType Application ping
|
|
|
|
|
if ($pingCommand.Definition.IndexOf("\\") -ne -1)
|
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Function GetTempDir
|
|
|
|
|
{
|
|
|
|
|
if (IsWindows)
|
|
|
|
|
{
|
|
|
|
|
return $env:TEMP
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-12-18 17:22:39 -08:00
|
|
|
return "/tmp"
|
2015-11-10 08:41:54 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|