mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-19 16:27:53 +08:00
Trying to get tcc working
This commit is contained in:
14
vendor/lib/lib_git.cmd
vendored
14
vendor/lib/lib_git.cmd
vendored
@ -42,11 +42,11 @@ exit /b
|
||||
|
||||
:: set the executable path
|
||||
set "git_executable=%~2\git.exe"
|
||||
%lib_console% debug-output :read_version "Env Var - git_executable=%git_executable%"
|
||||
%lib_console% debug_output :read_version "Env Var - git_executable=%git_executable%"
|
||||
|
||||
:: check if the executable actually exists
|
||||
if not exist "%git_executable%" (
|
||||
%lib_console% debug-output :read_version "%git_executable% does not exist."
|
||||
%lib_console% debug_output :read_version "%git_executable% does not exist."
|
||||
exit /b -255
|
||||
)
|
||||
|
||||
@ -54,7 +54,7 @@ exit /b
|
||||
for /F "tokens=1,2,3 usebackq" %%A in (`"%git_executable%" --version 2^>nul`) do (
|
||||
if /i "%%A %%B" == "git version" (
|
||||
set "GIT_VERSION_%~1=%%C"
|
||||
%lib_console% debug-output :read_version "Env Var - GIT_VERSION_%~1=%%C"
|
||||
%lib_console% debug_output :read_version "Env Var - GIT_VERSION_%~1=%%C"
|
||||
) else (
|
||||
%lib_console% show_error "git --version" returned an inproper version string!
|
||||
pause
|
||||
@ -124,7 +124,7 @@ exit /b
|
||||
call :parse_version %~1 %~2
|
||||
|
||||
:: ... and maybe display it, for debugging purposes.
|
||||
%lib_console% debug-output :validate_version "Found Git Version for %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!"
|
||||
%lib_console% debug_output :validate_version "Found Git Version for %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!"
|
||||
exit /b
|
||||
|
||||
:compare_versions
|
||||
@ -148,9 +148,9 @@ exit /b
|
||||
:: checks all major, minor, patch and build variables for the given arguments.
|
||||
:: whichever binary that has the most recent version will be used based on the return code.
|
||||
|
||||
:: %lib_console% debug-output Comparing:
|
||||
:: %lib_console% debug-output %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!
|
||||
:: %lib_console% debug-output %~2: !%~2_MAJOR!.!%~2_MINOR!.!%~2_PATCH!.!%~2_BUILD!
|
||||
:: %lib_console% debug_output Comparing:
|
||||
:: %lib_console% debug_output %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!
|
||||
:: %lib_console% debug_output %~2: !%~2_MAJOR!.!%~2_MINOR!.!%~2_PATCH!.!%~2_BUILD!
|
||||
|
||||
if !%~1_MAJOR! GTR !%~2_MAJOR! (exit /b 1)
|
||||
if !%~1_MAJOR! LSS !%~2_MAJOR! (exit /b -1)
|
||||
|
Reference in New Issue
Block a user