From cb519e8585259e64c399ec28896688132c67be0f Mon Sep 17 00:00:00 2001 From: Judah Caruso Date: Thu, 19 Feb 2026 23:56:21 -0700 Subject: [PATCH] simplify commands --- do.ps1 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/do.ps1 b/do.ps1 index 8d6f58e..ce19e47 100755 --- a/do.ps1 +++ b/do.ps1 @@ -215,18 +215,13 @@ switch ($command) { } } {($_ -eq "run") -or ($_ -eq "r")} { - $release = $rest[0] -eq "release" -or $rest[0] -eq "fast"; - $binary = Join-Path $OUT_DIR ($EXE_NAME + (Get-Ext $HOST_OS)); - $cmd = "$(CompileCommand $HOST_OS $release) -o $binary"; - - Write-Host (":: Compiling natively" + $(if ($release) { " (release mode)" } else { "" })); - Write-Host $cmd; - - Invoke-Expression $cmd | Write-Host; - - if ($LASTEXITCODE -eq 0) { - Invoke-Expression $binary | Write-Host; + $binary = Join-Path $OUT_DIR ($EXE_NAME + (Get-Ext $HOST_OS)); + if (-not (Test-Path $binary)) { + $release = $rest[0] -eq "release" -or $rest[0] -eq "fast"; + &"./do.ps1" build if ($release) { "release" } else { "" }; } + + Invoke-Expression $binary | Write-Host; } {($_ -eq "run-wasm") -or ($_ -eq "rw")} { if (-not (Test-Path (Join-Path $OUT_DIR "p2601.wasm"))) {