Some checks are pending
Build Windows DLL / Build for Windows (push) Waiting to run
Added GitHub Actions workflow and build scripts from obsproject/obs-plugintemplate for Windows DLL builds. Push to GitHub and go to Actions tab to build the DLL.
29 lines
716 B
PowerShell
29 lines
716 B
PowerShell
function Ensure-Location {
|
|
<#
|
|
.SYNOPSIS
|
|
Ensures current location to be set to specified directory.
|
|
.DESCRIPTION
|
|
If specified directory exists, switch to it. Otherwise create it,
|
|
then switch.
|
|
.EXAMPLE
|
|
Ensure-Location "My-Directory"
|
|
Ensure-Location -Path "Path-To-My-Directory"
|
|
#>
|
|
|
|
param(
|
|
[Parameter(Mandatory)]
|
|
[string] $Path
|
|
)
|
|
|
|
if ( ! ( Test-Path $Path ) ) {
|
|
$_Params = @{
|
|
ItemType = "Directory"
|
|
Path = ${Path}
|
|
ErrorAction = "SilentlyContinue"
|
|
}
|
|
|
|
New-Item @_Params | Set-Location
|
|
} else {
|
|
Set-Location -Path ${Path}
|
|
}
|
|
}
|