Skip to content

Commit 006d821

Browse files
author
Orion Hodson
committed
Add workspace-status.cmd for Windows
This is just a wrapper that invokes bash to run `tools/unix/workspace-status.sh`. Follow-up to #1059 and #1060
1 parent 268cce6 commit 006d821

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tools/windows/workspace-status.cmd

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@setlocal enabledelayedexpansion
2+
@echo off
3+
4+
@rem find git.exe
5+
for /F "tokens=* USEBACKQ" %%F in (`where git.exe`) do (
6+
set "GIT=%%F"
7+
break
8+
)
9+
10+
@rem Git's bash is located at %GITINSTALLDIR%\bin\bash.exe
11+
@rem Git's git.exe is typically located at %GITINSTALLDIR%\cmd\git.exe or
12+
@rem %GITINSTALLDIR%\mingw64\bin\git.exe.
13+
set "_GITEXEDIR=%GIT:\cmd\git.exe=%"
14+
set "GITEXEDIR=%_GITEXEDIR:\mingw64\bin\git.exe=%"
15+
set "BASH=%GITEXEDIR%\bin\bash.exe"
16+
17+
@rem Change to the directory of this script (tools/windows) to
18+
@rem run bash script in (tools/unix).
19+
cd "%~dp0"
20+
"%BASH%" -c ../unix/workspace-status.sh

0 commit comments

Comments
 (0)