diff options
author | Matt Ellis <matell@microsoft.com> | 2017-04-27 00:48:49 +0300 |
---|---|---|
committer | Matt Ellis <matell@microsoft.com> | 2017-04-27 00:48:49 +0300 |
commit | 2f5a1397afa4c72a91664e3c25dcc9c428bf90aa (patch) | |
tree | 4373cd0b2f745cab2a8d7cc80919cff3846c51c5 /init-tools.sh | |
parent | 0ead8cc41de4dd286ae8a1c8d3034bf508ab4f31 (diff) |
Use the "portable linux" version of the CLI
This lets us clean up our os detection logic in init-tools in favor of
just always downloading the linux-x64 build. This should also help
improve the number of distros we can build on, since linux-x64 should
work on any recent glibc based distro that has our dependencies
installed.
I also cleaned up crossgen.sh so we didn't need to play games around
trying to convert the rid of the current platform to something we
could restore a runtime package for.
Diffstat (limited to 'init-tools.sh')
-rwxr-xr-x | init-tools.sh | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/init-tools.sh b/init-tools.sh index 85daec51b7..e21de82ec2 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -14,54 +14,6 @@ __BUILD_TOOLS_PATH=$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PA __INIT_TOOLS_RESTORE_PROJECT=$__scriptpath/init-tools.msbuild __INIT_TOOLS_DONE_MARKER=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/done -# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc -get_current_linux_name() { - # Detect Distro - if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then - if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then - echo "ubuntu.16.04" - return 0 - fi - if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then - echo "ubuntu.16.10" - return 0 - fi - - echo "ubuntu" - return 0 - elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then - echo "centos" - return 0 - elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then - echo "rhel" - return 0 - elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then - echo "debian" - return 0 - elif [ "$(cat /etc/*-release | grep -cim1 alpine)" -eq 1 ]; then - echo "alpine" - return 0 - elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then - if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then - echo "fedora.24" - return 0 - fi - elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then - if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then - echo "opensuse.13.2" - return 0 - fi - if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then - echo "opensuse.42.1" - return 0 - fi - fi - - # Cannot determine Linux distribution, assuming Ubuntu 14.04. - echo "ubuntu" - return 0 -} - if [ -z "$__DOTNET_PKG" ]; then if [ "$(uname -m | grep "i[3456]86")" = "i686" ]; then echo "Warning: build not supported on 32 bit Unix" @@ -75,14 +27,14 @@ OSName=$(uname -s) ;; Linux) - __DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64" + __DOTNET_PKG=dotnet-dev-linux-x64 OS=Linux ;; *) - echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools." + echo "Unsupported OS '$OSName' detected. Downloading linux-x64 tools." OS=Linux - __DOTNET_PKG=dotnet-dev-ubuntu-x64 + __DOTNET_PKG=dotnet-dev-linux-x64 ;; esac fi |