From b8d120b4ee3f4eff922fcf8a4ba64b91d65b9d75 Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:07:50 +0200 Subject: [PATCH] Add Run switch to Run winutil automatically after compilation --- Compile.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Compile.ps1 b/Compile.ps1 index 8568e1af..c296eb7f 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -1,5 +1,6 @@ param ( - [switch]$Debug + [switch]$Debug, + [switch]$Run ) $OFS = "`r`n" $scriptname = "winutil.ps1" @@ -106,4 +107,8 @@ else { } Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding ascii -Write-Progress -Activity "Compiling" -Completed \ No newline at end of file +Write-Progress -Activity "Compiling" -Completed + +if ($run){ + Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname" +} \ No newline at end of file