15 lines
439 B
PowerShell
15 lines
439 B
PowerShell
|
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;
|
||
|
}
|