From 62dbc19425365185ed147077c4f96fd4427ff652 Mon Sep 17 00:00:00 2001 From: Simon Buchan Date: Mon, 27 Nov 2023 21:41:13 +1300 Subject: [PATCH 1/2] Add Windows wrappers for ./y --- y.cmd | 9 +++++++++ y.ps1 | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 y.cmd create mode 100644 y.ps1 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 +} From f5a74dc9d0d58bcc1b9835d0367d9b1963a6548a Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:42:08 +0100 Subject: [PATCH 2/2] Add missing trailing newline in y.cmd --- y.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/y.cmd b/y.cmd index e00f1bdc854..e9b688645a4 100644 --- a/y.cmd +++ b/y.cmd @@ -6,4 +6,4 @@ build\y.exe %* || goto :error goto :EOF :error -exit /b \ No newline at end of file +exit /b