File tree Expand file tree Collapse file tree 1 file changed +78
-0
lines changed
Expand file tree Collapse file tree 1 file changed +78
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ Inline.Bash
3+ -----------
4+ ### Synopsis
5+ Bash PipeScript Transpiler.
6+
7+ ---
8+ ### Description
9+
10+ Transpiles Bash with Inline PipeScript into Bash.
11+
12+ Heredocs named PipeScript{} will be treated as blocks of PipeScript.
13+
14+ ``` bash
15+ << PipeScript{}
16+
17+ # This will be considered PipeScript / PowerShell, and will return the contents of a bash script.
18+
19+ PipeScript{}
20+ ```
21+
22+ ---
23+ ### Examples
24+ #### EXAMPLE 1
25+ ``` PowerShell
26+ Invoke-PipeScript {
27+ $bashScript = @'
28+ echo 'hello world'
29+ ```
30+ <<PipeScript{}
31+ "echo '$('hi','yo','sup' | Get-Random)'"
32+ PipeScript{}
33+ '@
34+
35+ [OutputFile('.\HelloWorld.ps1.sh')]$bashScript
36+ }
37+
38+ Invoke-PipeScript .\HelloWorld.ps1.sh
39+ ---
40+ ### Parameters
41+ #### ** CommandInfo**
42+
43+ The command information. This will include the path to the file.
44+
45+
46+
47+ | Type | Requried| Postion| PipelineInput |
48+ | -------------------| --------| -------| --------------|
49+ | ``` [CommandInfo] ``` | true | 1 | true (ByValue)|
50+ ---
51+ #### ** Parameter**
52+
53+ A dictionary of parameters.
54+
55+
56+
57+ | Type | Requried| Postion| PipelineInput|
58+ | -------------------| --------| -------| -------------|
59+ | ``` [IDictionary] ``` | false | 2 | false |
60+ ---
61+ #### ** ArgumentList**
62+
63+ A list of arguments.
64+
65+
66+
67+ | Type | Requried| Postion| PipelineInput|
68+ | ------------------| --------| -------| -------------|
69+ | ``` [PSObject[]] ``` | false | 3 | false |
70+ ---
71+ ### Syntax
72+ ``` PowerShell
73+ Inline.Bash [-CommandInfo] <CommandInfo> [[-Parameter] <IDictionary>] [[-ArgumentList] <PSObject[]>] [<CommonParameters>]
74+ ```
75+ ---
76+
77+
78+
You can’t perform that action at this time.
0 commit comments