diff options
| author | Simon Buchan <simon.buchan@skilitics.com> | 2023-11-27 21:41:13 +1300 |
|---|---|---|
| committer | Simon Buchan <simon.buchan@skilitics.com> | 2023-11-27 21:41:13 +1300 |
| commit | 62dbc19425365185ed147077c4f96fd4427ff652 (patch) | |
| tree | 3e081b354164abb6ccc56ca329e92af1bf6e9d90 | |
| parent | 6b82fe231d62d3a457e1d9141e3f8b9b5ea80c78 (diff) | |
| download | rust-62dbc19425365185ed147077c4f96fd4427ff652.tar.gz rust-62dbc19425365185ed147077c4f96fd4427ff652.zip | |
Add Windows wrappers for ./y
| -rw-r--r-- | y.cmd | 9 | ||||
| -rw-r--r-- | y.ps1 | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/y.cmd b/y.cmd new file mode 100644 index 00000000000..e00f1bdc854 --- /dev/null +++ b/y.cmd @@ -0,0 +1,9 @@ +@echo off +echo [BUILD] build system >&2 +mkdir build 2>nul +rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021 || goto :error +build\y.exe %* || goto :error +goto :EOF + +:error +exit /b \ No newline at end of file diff --git a/y.ps1 b/y.ps1 new file mode 100644 index 00000000000..02ef0fcbd50 --- /dev/null +++ b/y.ps1 @@ -0,0 +1,12 @@ +$ErrorActionPreference = "Stop" + +$host.ui.WriteErrorLine("[BUILD] build system") +New-Item -ItemType Directory -Force -Path build | Out-Null +& rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021 +if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE +} +& build\y.exe $args +if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE +} |
