diff --git a/.gitattributes b/.gitattributes index fcadb2cf..4fbd8ef9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text eol=lf +*.bat text eol=crlf diff --git a/activate.bat b/activate.bat new file mode 100644 index 00000000..dda948c1 --- /dev/null +++ b/activate.bat @@ -0,0 +1,30 @@ +@echo off + +REM ------------------------------------------------------------------------------ +REM +REM This is the `git-subrepo` cmd initialization script. +REM +REM This script turns on the `git-subrepo` Git subcommand for Windows command-line +REM +REM Just execute inside cmd.exe or another batch file: +REM +REM path\to\git-subrepo\activate.bat +REM +REM ------------------------------------------------------------------------------ + + +where git.exe >nul 2>nul +if %ERRORLEVEL% NEQ 0 ( + echo could not find git in PATH + goto:end +) + +if NOT "%GIT_SUBREPO_ROOT%" == "%~dp0" ( + set "GIT_SUBREPO_ROOT=%~dp0" + set "PATH=%~dp0lib;%PATH%" +) +for /F "tokens=* USEBACKQ" %%F IN (`git subrepo --version`) do ( + echo using version %%F in %GIT_SUBREPO_ROOT% +) + +:end