From 62dbc19425365185ed147077c4f96fd4427ff652 Mon Sep 17 00:00:00 2001 From: Simon Buchan Date: Mon, 27 Nov 2023 21:41:13 +1300 Subject: [PATCH] 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 +}