Support "offline" initializtion of Tools (dotnet/coreclr#7715)
authorMatt Ellis <matell@microsoft.com>
Wed, 19 Oct 2016 08:42:45 +0000 (01:42 -0700)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 19 Oct 2016 08:42:45 +0000 (10:42 +0200)
commita8f421ab8fa4b6db95aada25d9a329e957c05633
treee704e7408f8aa177036b0101d9439fb55e13c45e
parent289836ec3e0ff1189e67c33b94e8551394cd05ca
Support "offline" initializtion of Tools (dotnet/coreclr#7715)

This change allows init-tools to function in an "offline" mode where
tools are picked up from standalone folders. Specifically, it introduces
support for two new environment variables:

- DOTNET_TOOLSET_DIR
- BUILD_TOOLS_TOOLSET_DIR

If either is set, instead of downloading toolsets, we copy an already
existing one from the folder.  The TOOLSET_DIR is a folder with sub
directories for every version of the tool in question.

For buildtools, we expect a published toolset (sans the "dotnetcli"
folder) not just a set of nuget packages (i.e. the layout of Tools/
after running ./init-tools.sh in "online" mode).

The above varibles are useful for situations where we want to carry
multiple toolsets with us, but are less helpful for places where a
developer has produced their own toolset by hand (since the resulting
folder structure contains extra version information). For these cases,
I've added

- DOTNET_TOOL_DIR
- BUILD_TOOLS_TOOL_DIR

Which work like the above but don't require the nested folder structure.

Commit migrated from https://github.com/dotnet/coreclr/commit/380dd6d4aad88103efa6ae58830be356d20e742d
src/coreclr/init-tools.sh