Skip to content

Commit

Permalink
Add workspace-status.cmd for Windows
Browse files Browse the repository at this point in the history
This is just a wrapper that invokes bash to run
`tools/unix/workspace-status.sh`.

Follow-up to #1059
and #1060
  • Loading branch information
ohodson committed Sep 1, 2023
1 parent 8a32b5e commit 8aabe6a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/windows/workspace-status.cmd
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8aabe6a

Please sign in to comment.