mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +08:00 
			
		
		
		
	Merge pull request #364 from narnaud/pr-local-git
Prefer user installed git over cmder one.
This commit is contained in:
		
							
								
								
									
										19
									
								
								vendor/init.bat
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/init.bat
									
									
									
									
										vendored
									
									
								
							| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user