text
stringlengths 0
834k
|
|---|
:close
|
ECHO ""Task done""
|
:end",23.2333333333,85,0.6692969871
|
165,d0183670c38174adccfd0c8b33db62780791f9fd,4811,bat,Batchfile,Dependencies.bat,fabriciocolombo/DUnitX,170e9b433cdabd7b5d67016a6aa1a6fe1257d4a2,['Apache-2.0'],,,,Dependencies.bat,fabriciocolombo/DUnitX,170e9b433cdabd7b5d67016a6aa1a6fe1257d4a2,['Apache-2.0'],,,,Dependencies.bat,fabriciocolombo/DUnitX,170e9b433cdabd7b5d67016a6aa1a6fe1257d4a2,['Apache-2.0'],,,,"@echo off
|
:: ##JWP TODO if %2 specifies a non-existing local repository name: emit error message (now it does nothing)
|
:: ##JWP TODO check for each command if it actually exists (hg.exe, git.exe, svn.exe, etc)
|
for %%c in (set show clone pull help) do if /I !%1!==!%%c! call :%*
|
if /I !%1!==!! call :help
|
goto :eof
|
:: this batch file routes all repository information through one central place :foorAllRepositories.
|
:: If you need more, or less: change the information there.
|
:forAllRepositories
|
pushd %~dp0
|
:: the for loop will strip leading spaces
|
for /f ""tokens=1,2,*"" %%l in (Dependencies.txt) do (
|
call :forOneRepository %%l %%m %%n %1 %2
|
echo .
|
)
|
popd
|
goto :eof
|
:forOneRepository
|
::for debugging purposes, uncomment the echo lines
|
::echo %*
|
::echo tool=%1
|
::echo localName=%2
|
::echo remoteURL=%3
|
::echo callLabel=%4
|
::echo matchIfNotEmpty=%5
|
::for %%d in (%~dp0..) do echo LocalDirectory=%%~fd\%2
|
::echo.
|
setlocal
|
set tool=%1
|
:: skip comments and empty lines
|
if ""%tool:~0,3%""==""rem"" goto :skipOneRepository
|
if ""%tool:~0,2%""==""::"" goto :skipOneRepository
|
if ""%tool:~0,1%""==""#"" goto :skipOneRepository
|
if ""%tool%""=="""" goto :skipOneRepository
|
goto :doOneRepository
|
:skipOneRepository
|
endlocal
|
goto :endOneRepository
|
:doOneRepository
|
endlocal
|
:: always if no match
|
if ""%5""=="""" call %4 %1 %2 %3
|
if /I ""%5""==""%2"" call %4 %1 %2 %3
|
:endOneRepository
|
goto :eof
|
:set
|
echo SET
|
call :forAllRepositories :setSpecific %1
|
goto :eof
|
:setSpecific
|
for %%d in (%~dp0..) do set %2=%%~fd\%2
|
set %2
|
goto :eof
|
:show
|
echo SHOW
|
call :forAllRepositories :showSpecific %1
|
goto :eof
|
:showSpecific
|
echo tool=%1
|
echo localName=%2
|
echo remoteURL=%3
|
echo callLabel=%4
|
echo matchIfNotEmpty=%5
|
for %%d in (%~dp0..) do echo LocalDirectory=%%~fd\%2
|
echo.
|
goto :eof
|
:: a bit ugly setlocal/endlocal, but it is the cleanest way to do this.
|
:clone
|
echo CLONE (or checkout)
|
setlocal
|
call :ensureExesExist
|
if /I ""%Found%""==""TRUE"" goto :cloneContinue
|
:cloneFail
|
endlocal
|
goto :eof
|
:cloneContinue
|
endlocal
|
call :forAllRepositories :cloneSpecific %1
|
goto :eof
|
:cloneSpecific
|
if hg==%1 for %%d in (%~dp0..) do call :do %1 clone %3 %%~fd\%2
|
if git==%1 for %%d in (%~dp0..) do call :do %1 clone %3 %%~fd\%2
|
if svn==%1 for %%d in (%~dp0..) do call :do %1 checkout %3 %%~fd\%2
|
goto :eof
|
:: trick to perform a command while being able to echo it
|
:do
|
echo %*
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.