File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
- $CommandsPath = (Join-Path $PSScriptRoot " Commands" )
2
- [Include (' *-*.ps1' )]$CommandsPath
1
+ param ()
2
+
3
+ if ((-not (Test-Path ' .git' )) -or $args -match ' production' ) {
4
+ . $PSScriptRoot / allcommands.ps1
5
+ } else {
6
+ $CommandsPath = (Join-Path $PSScriptRoot " Commands" )
7
+ [Include (' *-*.ps1' )]$CommandsPath
8
+ }
9
+
10
+
3
11
4
12
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
5
13
Get-OBSEffect | Stop-OBSEffect
@@ -18,6 +26,7 @@ if ($home) {
18
26
New-PSDrive - Name " my-$ ( $MyModule.Name ) " - Root (Join-Path $home " .$ ( $myModule.Name ) " ) - Description " My $MyModule " @NewDriveSplat
19
27
}
20
28
29
+ # region obs-powershell startup
21
30
foreach ($noun in ' Streaming' , ' Recording' ) {
22
31
foreach ($verb in ' Start' , ' Stop' ) {
23
32
Set-Alias " $verb -$noun " " $verb -OBS$ ( $noun -replace ' ing' ) "
@@ -38,4 +47,6 @@ if (Test-Path $ModuleProfilePath) {
38
47
. $ModuleProfilePath
39
48
}
40
49
50
+ # endregion obs-powershell startup
51
+
41
52
Export-ModuleMember - Function * - Variable $script :variablesToExport - Alias *
You can’t perform that action at this time.
0 commit comments