From cd18af03bcbb86cc1a8a259316a0d5e7f2d9ea33 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 1 Oct 2018 18:52:27 -0700 Subject: [PATCH] Revert "install-powershell.sh: Adding autodetection of curl / wget" due to regression from PR #7893 (#7918) This reverts commit 4831a9fd639e9386075f0622710675105c43cff9. --- tools/install-powershell.sh | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/tools/install-powershell.sh b/tools/install-powershell.sh index f53ee638e6..2e6991417c 100755 --- a/tools/install-powershell.sh +++ b/tools/install-powershell.sh @@ -1,12 +1,10 @@ #!/bin/bash -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. install(){ #Companion code for the blog https://cloudywindows.com #call this code direction from the web with: - #bash <(wget -qO - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) + #bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) #wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh | bash -s #bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) @@ -130,16 +128,9 @@ install(){ else #Script files are not local - pull from remote echo "Could not find \"appimage.sh\" next to this script..." - echo "Pulling and executing it from \"$gitreposcriptroot/appimage.sh\"" - if [ -n "$(command -v curl)" ]; then - echo "found and using curl" - bash <(curl -s $gitreposcriptroot/appimage.sh) $@ - elif [ -n "$(command -v wget)" ]; then - echo "found and using wget" - bash <(wget -qO- $gitreposcriptroot/appimage.sh) $@ - else - echo "Could not find curl or wget, install one of these or manually download \"$gitreposcriptroot/appimage.sh\"" - fi + echo "Pulling it from \"$gitreposcriptroot/appimage.sh\"" + bash <(wget -qO- $gitreposcriptroot/appimage.sh) $@ + fi elif [ "$DistroBasedOn" == "redhat" ] || [ "$DistroBasedOn" == "debian" ] || [ "$DistroBasedOn" == "osx" ] || [ "$DistroBasedOn" == "suse" ] || [ "$DistroBasedOn" == "amazonlinux" ]; then echo "Configuring PowerShell Core Enviornment for: $DistroBasedOn $DIST $REV" if [ -f $SCRIPTFOLDER/installpsh-$DistroBasedOn.sh ]; then @@ -148,16 +139,13 @@ install(){ else #Script files are not local - pull from remote echo "Could not find \"installpsh-$DistroBasedOn.sh\" next to this script..." - echo "Pulling and executing it from \"$gitreposcriptroot/installpsh-$DistroBasedOn.sh\"" - if [ -n "$(command -v curl)" ]; then - echo "found and using curl" + echo "Pulling it from \"$gitreposcriptroot/installpsh-$DistroBasedOn.sh\"" + if [ "$OS" == "osx" ]; then bash <(curl -s $gitreposcriptroot/installpsh-$DistroBasedOn.sh) $@ - elif [ -n "$(command -v wget)" ]; then - echo "found and using wget" - bash <(wget -qO- $gitreposcriptroot/installpsh-$DistroBasedOn.sh) $@ else - echo "Could not find curl or wget, install one of these or manually download \"$gitreposcriptroot/installpsh-$DistroBasedOn.sh\"" + bash <(wget -qO- $gitreposcriptroot/installpsh-$DistroBasedOn.sh) $@ fi + fi else echo "Sorry, your operating system is based on $DistroBasedOn and is not supported by PowerShell Core or this installer at this time." fi