Add a script for running bash
from powershell
This commit is contained in:
parent
654370f4f0
commit
ea1078e5db
2 changed files with 18 additions and 14 deletions
scripts/Windows/Scripts
14
scripts/Windows/Scripts/BashScript.ps1
Normal file
14
scripts/Windows/Scripts/BashScript.ps1
Normal file
|
@ -0,0 +1,14 @@
|
|||
function Start-BashScript() {
|
||||
param(
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[string[]]$Content
|
||||
)
|
||||
|
||||
Write-Information "Preparing setup script";
|
||||
$script = New-TemporaryFile;
|
||||
$script = Rename-Item $script -NewName "$script.sh" -PassThru;
|
||||
Set-Content $script ([string]::Join("`n", $Content));
|
||||
Write-Information "Running prepared script";
|
||||
Start-Process -Wait $script;
|
||||
Remove-Item $script;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue