simplify commands
This commit is contained in:
parent
37277400b0
commit
cb519e8585
1 changed files with 6 additions and 11 deletions
17
do.ps1
17
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"))) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue