Merge pull request #5889 from dotnet/dev/jgoshi/updateDotnetInstallScript

Update the install script to support osname
This commit is contained in:
Piotr Puszkiewicz 2017-03-03 12:49:58 -08:00 committed by GitHub
commit a9ba12921b

View file

@ -60,7 +60,10 @@ get_current_os_name() {
eval $invocation eval $invocation
local uname=$(uname) local uname=$(uname)
if [ "$uname" = "Darwin" ]; then if [ "$linux_portable" = true ]; then
echo "linux"
return 0
elif [ "$uname" = "Darwin" ]; then
echo "osx" echo "osx"
return 0 return 0
else else
@ -584,6 +587,7 @@ azure_feed="https://dotnetcli.azureedge.net/dotnet"
uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
verbose=false verbose=false
shared_runtime=false shared_runtime=false
linux_portable=false
while [ $# -ne 0 ] while [ $# -ne 0 ]
do do
@ -624,6 +628,9 @@ do
shift shift
azure_feed="$1" azure_feed="$1"
;; ;;
--linux-portable|-[Ll]inux[Pp]ortable)
linux_portable=true
;;
-?|--?|-h|--help|-[Hh]elp) -?|--?|-h|--help|-[Hh]elp)
script_name="$(basename $0)" script_name="$(basename $0)"
echo ".NET Tools Installer" echo ".NET Tools Installer"
@ -648,6 +655,8 @@ do
echo " --no-path, -NoPath Do not set PATH for the current process." echo " --no-path, -NoPath Do not set PATH for the current process."
echo " --verbose,-Verbose Display diagnostics information." echo " --verbose,-Verbose Display diagnostics information."
echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed" 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 " -?,--?,-h,--help,-Help Shows this help message" echo " -?,--?,-h,--help,-Help Shows this help message"
echo "" echo ""
echo "Install Location:" echo "Install Location:"