From 006d8215ee099c45be18db8f729f27ed33ed4909 Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Fri, 1 Sep 2023 16:57:55 +0100 Subject: [PATCH] Add workspace-status.cmd for Windows This is just a wrapper that invokes bash to run `tools/unix/workspace-status.sh`. Follow-up to https://github.com/cloudflare/workerd/pull/1059 and https://github.com/cloudflare/workerd/pull/1060 --- tools/windows/workspace-status.cmd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tools/windows/workspace-status.cmd diff --git a/tools/windows/workspace-status.cmd b/tools/windows/workspace-status.cmd new file mode 100644 index 00000000000..be63831ffad --- /dev/null +++ b/tools/windows/workspace-status.cmd @@ -0,0 +1,20 @@ +@setlocal enabledelayedexpansion +@echo off + +@rem find git.exe +for /F "tokens=* USEBACKQ" %%F in (`where git.exe`) do ( + set "GIT=%%F" + break +) + +@rem Git's bash is located at %GITINSTALLDIR%\bin\bash.exe +@rem Git's git.exe is typically located at %GITINSTALLDIR%\cmd\git.exe or +@rem %GITINSTALLDIR%\mingw64\bin\git.exe. +set "_GITEXEDIR=%GIT:\cmd\git.exe=%" +set "GITEXEDIR=%_GITEXEDIR:\mingw64\bin\git.exe=%" +set "BASH=%GITEXEDIR%\bin\bash.exe" + +@rem Change to the directory of this script (tools/windows) to +@rem run bash script in (tools/unix). +cd "%~dp0" +"%BASH%" -c ../unix/workspace-status.sh