22 lines
306 B
PowerShell
22 lines
306 B
PowerShell
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
|
|
{
|
|
return "/tmp"
|
|
}
|
|
}
|
|
|