Prefer user installed git over cmder one.

Also set SVN_SSH (pointing to git ssh) so we can use git svn on
ssh svn repositories.
This commit is contained in:
Nicolas Arnaud-Cormos 2015-01-10 09:59:18 +01:00
parent 17b4525e60
commit 45ff72b48b

19
vendor/init.bat vendored
View File

@ -27,9 +27,24 @@
@set PLINK_PROTOCOL=ssh
@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
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
@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%
@set PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%
:: Add aliases
@doskey /macrofile="%CMDER_ROOT%\config\aliases"