simplify commands

This commit is contained in:
Judah Caruso 2026-02-19 23:56:21 -07:00
parent 37277400b0
commit cb519e8585

17
do.ps1
View file

@ -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"))) {