You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
21
external/corefx/init-tools.cmd
vendored
21
external/corefx/init-tools.cmd
vendored
@@ -18,7 +18,7 @@ if [%1]==[force] (
|
||||
if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
|
||||
)
|
||||
|
||||
:: If sempahore exists do nothing
|
||||
:: If semaphore exists do nothing
|
||||
if exist "%BUILD_TOOLS_SEMAPHORE%" (
|
||||
echo Tools are already initialized.
|
||||
goto :EOF
|
||||
@@ -39,8 +39,8 @@ set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
|
||||
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
|
||||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
|
||||
if NOT exist "%DOTNET_LOCAL_PATH%" (
|
||||
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
|
||||
exit /b 1
|
||||
echo ERROR: Could not install dotnet cli correctly. 1>&2
|
||||
goto :error
|
||||
)
|
||||
|
||||
:afterdotnetrestore
|
||||
@@ -50,8 +50,8 @@ echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
|
||||
echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
|
||||
call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
|
||||
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
|
||||
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
|
||||
exit /b 1
|
||||
echo ERROR: Could not restore build tools correctly. 1>&2
|
||||
goto :error
|
||||
)
|
||||
|
||||
:afterbuildtoolsrestore
|
||||
@@ -61,11 +61,16 @@ echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRU
|
||||
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
|
||||
set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
|
||||
if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
|
||||
echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
|
||||
exit /b %INIT_TOOLS_ERRORLEVEL%
|
||||
echo ERROR: An error occured when trying to initialize the tools. 1>&2
|
||||
goto :error
|
||||
)
|
||||
|
||||
:: Create sempahore file
|
||||
:: Create semaphore file
|
||||
echo Done initializing tools.
|
||||
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
|
||||
exit /b 0
|
||||
|
||||
:error
|
||||
echo Please check the detailed log that follows. 1>&2
|
||||
type "%INIT_TOOLS_LOG%" 1>&2
|
||||
exit /b 1
|
||||
|
||||
Reference in New Issue
Block a user