Merge pull request #364 from narnaud/pr-local-git

Prefer user installed git over cmder one.
This commit is contained in:
Martin Kemp 2015-03-18 11:00:44 +00:00
commit b25e46d7a7

19
vendor/init.bat vendored
View File

@ -27,9 +27,24 @@
@set PLINK_PROTOCOL=ssh @set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=cygwin @if not defined TERM set TERM=cygwin
:: Check if msysgit is installed
@if exist "%ProgramFiles%\Git" (
set "GIT_INSTALL_ROOT=%ProgramFiles%\Git"
) else if exist "%ProgramFiles(x86)%\Git" (
set "GIT_INSTALL_ROOT=%ProgramFiles(x86)%\Git"
) else if exist "%CMDER_ROOT%\vendor" (
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\msysgit"
)
:: Add git to the path
@if defined GIT_INSTALL_ROOT (
set "PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\share\vim\vim74;%PATH%"
:: define SVN_SSH so we can use git svn with ssh svn repositories
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
)
:: Enhance Path :: Enhance Path
@set git_install_root=%CMDER_ROOT%\vendor\msysgit @set PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%
@set PATH=%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim74;%CMDER_ROOT%;%PATH%
:: Add aliases :: Add aliases
@doskey /macrofile="%CMDER_ROOT%\config\aliases" @doskey /macrofile="%CMDER_ROOT%\config\aliases"