-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitgm.cmd
More file actions
37 lines (33 loc) · 915 Bytes
/
Copy pathgitgm.cmd
File metadata and controls
37 lines (33 loc) · 915 Bytes
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
@echo off
set "GIT_SH="
if exist "%ProgramFiles%\Git\bin\sh.exe" (
set "GIT_SH=%ProgramFiles%\Git\bin\sh.exe"
goto :found
)
if exist "%ProgramFiles%\Git\usr\bin\sh.exe" (
set "GIT_SH=%ProgramFiles%\Git\usr\bin\sh.exe"
goto :found
)
if exist "%LocalAppData%\Programs\Git\bin\sh.exe" (
set "GIT_SH=%LocalAppData%\Programs\Git\bin\sh.exe"
goto :found
)
if exist "C:\Program Files (x86)\Git\bin\sh.exe" (
set "GIT_SH=C:\Program Files (x86)\Git\bin\sh.exe"
goto :found
)
if exist "C:\Program Files (x86)\Git\usr\bin\sh.exe" (
set "GIT_SH=C:\Program Files (x86)\Git\usr\bin\sh.exe"
goto :found
)
where /q sh.exe
if %ERRORLEVEL% equ 0 (
set "GIT_SH=sh.exe"
goto :found
)
echo [GitGM Erro] Nao foi possivel encontrar o executavel do Git Bash (sh.exe).
echo Verifique se o Git for Windows esta instalado.
exit /b 1
:found
"%GIT_SH%" "%~dp0gitgm.sh" %*
exit /b %ERRORLEVEL%