From ea5eeee06b34dea5868d78370889c02af0a9889a Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Wed, 1 Mar 2017 16:00:26 -0800 Subject: [PATCH 1/4] Update the install script to support osname --- scripts/obtain/dotnet-install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 62edadd5d..01eb987a4 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -60,7 +60,10 @@ get_current_os_name() { eval $invocation local uname=$(uname) - if [ "$uname" = "Darwin" ]; then + if [ ! -z "$osname_override" ]; then + echo "$osname_override" + return 0 + elif [ "$uname" = "Darwin" ]; then echo "osx" return 0 else @@ -584,6 +587,7 @@ azure_feed="https://dotnetcli.azureedge.net/dotnet" uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" verbose=false shared_runtime=false +osname_override= while [ $# -ne 0 ] do @@ -624,6 +628,10 @@ do shift azure_feed="$1" ;; + --osname) + shift + osname_override="$1" + ;; -?|--?|-h|--help|-[Hh]elp) script_name="$(basename $0)" echo ".NET Tools Installer" @@ -648,6 +656,7 @@ do echo " --no-path, -NoPath Do not set PATH for the current process." echo " --verbose,-Verbose Display diagnostics information." echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" + echo " --osname Specific OS name to use. Defaults to being computed" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" echo "Install Location:" From e21c1a4a988f679305e75da01e6c196d76c1c200 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Fri, 3 Mar 2017 09:25:31 -0800 Subject: [PATCH 2/4] Change the command line argument per PR comments --- scripts/obtain/dotnet-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 01eb987a4..4390ac8ed 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -60,8 +60,8 @@ get_current_os_name() { eval $invocation local uname=$(uname) - if [ ! -z "$osname_override" ]; then - echo "$osname_override" + if [ "$linux_portable" = true ]; then + echo "linux" return 0 elif [ "$uname" = "Darwin" ]; then echo "osx" @@ -587,7 +587,7 @@ azure_feed="https://dotnetcli.azureedge.net/dotnet" uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" verbose=false shared_runtime=false -osname_override= +linux_portable=false while [ $# -ne 0 ] do @@ -628,9 +628,8 @@ do shift azure_feed="$1" ;; - --osname) - shift - osname_override="$1" + --linux-portable|-[Ll]inux[Pp]ortable) + linux_portable=true ;; -?|--?|-h|--help|-[Hh]elp) script_name="$(basename $0)" @@ -656,7 +655,8 @@ do echo " --no-path, -NoPath Do not set PATH for the current process." echo " --verbose,-Verbose Display diagnostics information." echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" - echo " --osname Specific OS name to use. Defaults to being computed" + echo " --linux-portable Installs the Linux portable shared runtime instead of the shared runtime for OS." + echo " -LinuxPortable" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" echo "Install Location:" From cdf85ec1d245b970ef8fce0f64d22b3d5a25a6e4 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Fri, 3 Mar 2017 11:02:09 -0800 Subject: [PATCH 3/4] Update the descriptino --- scripts/obtain/dotnet-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 4390ac8ed..90a0be5e6 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -655,7 +655,7 @@ do echo " --no-path, -NoPath Do not set PATH for the current process." echo " --verbose,-Verbose Display diagnostics information." echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" - echo " --linux-portable Installs the Linux portable shared runtime instead of the shared runtime for OS." + echo " --linux-portable Installs the Linux portable .NET Tools instead of a distro-specific version." echo " -LinuxPortable" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" From a66ef9f0efb15d0797440eb2d8171dab0e3cb1c1 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Fri, 3 Mar 2017 11:05:13 -0800 Subject: [PATCH 4/4] Fix spacing --- scripts/obtain/dotnet-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 90a0be5e6..af2b369a6 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -656,7 +656,7 @@ do echo " --verbose,-Verbose Display diagnostics information." echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" echo " --linux-portable Installs the Linux portable .NET Tools instead of a distro-specific version." - echo " -LinuxPortable" + echo " -LinuxPortable" echo " -?,--?,-h,--help,-Help Shows this help message" echo "" echo "Install Location:"