X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=sync.cmd;h=a69d30e9bafe581747d40fd8a6932a03e93a034e;hb=01bbc42b312caeb4000c9002561c62fe4e420ab5;hp=949f1605f9d3b9d9464a3526c51529d0f8632767;hpb=da66c3a146563d5841502a8dec76fe082ee9fef6;p=platform%2Fupstream%2Fcoreclr.git diff --git a/sync.cmd b/sync.cmd index 949f160..a69d30e 100644 --- a/sync.cmd +++ b/sync.cmd @@ -1,12 +1,46 @@ @if not defined _echo @echo off setlocal EnableDelayedExpansion +set "__args=%*" +set processedArgs= +set unprocessedArgs= +set __MSBuildArgs= + +REM If no processed arguments are specified, -p is implied. +if "%1" == "" (set __MSBuildArgs=.\build.proj /p:RestoreDuringBuild=true /t:Sync&goto ArgsDone) +if "%1" == "--" (set __MSBuildArgs=.\build.proj /p:RestoreDuringBuild=true /t:Sync&goto ArgsDone) + +:ArgLoop + +if "%1" == "" goto ArgsDone if /I [%1] == [-?] goto Usage if /I [%1] == [-help] goto Usage -@if [%1]==[] set __args=-p +REM This for loop splits the remaining arguments, preserving "=". +REM x gets the next argument, and y gets all remaining arguments after the first. +FOR /f "tokens=1*" %%x IN ("%*") DO ( + set param=%%x + if /i "!param!" == "-p" (set __MSBuildArgs=!__MSBuildArgs! .\build.proj /p:RestoreDuringBuild=true /t:Sync) + if /i "!param!" == "-ab" (set __MSBuildArgs=!__MSBuildArgs! .\src\syncAzure.proj) + if /i "!param:~0,14!" == "-AzureAccount=" (set v=!param:~14!&set __MSBuildArgs=!__MSBuildArgs! /p:CloudDropAccountName=!v!) + if /i "!param:~0,12!" == "-AzureToken=" (set v=!param:~12!&set __MSBuildArgs=!__MSBuildArgs! /p:CloudDropAccessToken=!v!) + if /i "!param:~0,12!" == "-BuildMajor=" (set v=!param:~12!&set __MSBuildArgs=!__MSBuildArgs! /p:BuildNumberMajor=!v!) + if /i "!param:~0,12!" == "-BuildMinor=" (set v=!param:~12!&set __MSBuildArgs=!__MSBuildArgs! /p:BuildNumberMinor=!v!) + if /i "!param:~0,11!" == "-Container=" (set v=!param:~11!&set __MSBuildArgs=!__MSBuildArgs! /p:ContainerName=!v!) + if /i "!param:~0,16!" == "-BlobNamePrefix=" (set v=!param:~16!&set __MSBuildArgs=!__MSBuildArgs! /p:__BlobNamePrefix=!v!) + if /i "!param:~0,11!" == "-RuntimeId=" (set v=!param:~11!&set __MSBuildArgs=!__MSBuildArgs! /p:RuntimeId=!v!) + REM all other arguments get passed through to msbuild unchanged. + if /i not "!param:~0,1!" == "-" (set __MSBuildArgs=!__MSBuildArgs! !param!) + + REM The innermost recursive invocation of :ArgLoop will execute + REM msbuild, and all other invocations simply exit. + call :ArgLoop %%y + exit /b +) + +:ArgsDone - @call %~dp0run.cmd sync %__args% %* +@call %~dp0dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false /flp:v=detailed;LogFile=sync.log %__MSBuildArgs% @exit /b %ERRORLEVEL% :Usage @@ -33,4 +67,4 @@ echo -RuntimeId="RID" (Needs to match what's in the container) echo. echo. echo. -echo If no option is specified then sync.cmd -p is implied. \ No newline at end of file +echo If no option is specified then sync.cmd -p is implied.