-
Notifications
You must be signed in to change notification settings - Fork 0
/
version-git.bat
41 lines (33 loc) · 811 Bytes
/
version-git.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
REM Is Git for Windows x64 installed?
if exist "%ProgramW6432%\Git\bin\bash.exe" (
echo Using bash from Git for Windows x64
setlocal
PATH=%ProgramW6432%\Git\mingw64\bin;%ProgramW6432%\Git\bin
bash version-git.sh
exit /b 0
)
REM Is Cygwin installed?
if exist C:\Cygwin\bin\bash.exe (
echo Using bash from Cygwin
setlocal
PATH=C:\Cygwin\bin
bash version-git.sh
exit /b 0
)
REM Is Cygwin64 installed?
if exist C:\Cygwin64\bin\bash.exe (
echo Using bash from Cygwin64
setlocal
PATH=C:\Cygwin64\bin
bash version-git.sh
exit /b 0
)
REM No Cygwin or Git for Windows installed
REM If there is a file assume if is properly generated
if exist version-git.h (
echo No bash found, but version-git.h exists
exit /b 0
)
echo No bash found
exit /b 1