From c31f274767613a64f651fb0af31896b6c4439412 Mon Sep 17 00:00:00 2001 From: DarwinJS Date: Fri, 5 May 2017 07:01:04 -0400 Subject: [PATCH 1/3] install-powershell.sh updating for pull request comments OSX Install script updated to use repositories Using TR, use curl rather than wget since we ensured it is on the system Update comments in install-powershell.sh install-powershell.sh --- tools/install-powershell.sh | 139 ++++++++++++++++++++++++++ tools/installpsh-debian.sh | 169 +++++++++++++++++++++++++++++++ tools/installpsh-osx.sh | 185 ++++++++++++++++++++++++++++++++++ tools/installpsh-redhat.sh | 162 ++++++++++++++++++++++++++++++ tools/installpsh-suse.sh | 192 ++++++++++++++++++++++++++++++++++++ 5 files changed, 847 insertions(+) create mode 100644 tools/install-powershell.sh create mode 100644 tools/installpsh-debian.sh create mode 100644 tools/installpsh-osx.sh create mode 100644 tools/installpsh-redhat.sh create mode 100644 tools/installpsh-suse.sh diff --git a/tools/install-powershell.sh b/tools/install-powershell.sh new file mode 100644 index 00000000000..90f3b2e4cf2 --- /dev/null +++ b/tools/install-powershell.sh @@ -0,0 +1,139 @@ +#!/bin/bash + +#Companion code for the blog https://cloudywindows.com + +#call this code direction from the web with: +#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) + + +#Usage - if you do not have the ability to run scripts directly from the web, +# pull all files in this repo folder and execute, this script +# automatically prefers local copies of sub-scripts + +#Completely automated install requires a root account or sudo with a password requirement + +#Switches +# -includeide - the script is being run headless, do not perform actions that require response from the console +# -interactivetesting - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts +# -appimage - does appimage instead of native install + +#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution + +VERSION="1.1.0" +gitreposubpath="PowerShell/PowerShell/master" +gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" +gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" +gitscriptname="install-powershell.psh" + +echo "Get-PowerShell Core MASTER Installer Version $VERSION" +echo "Installs PowerShell Core and Optional The Development Environment" +echo " Original script is at: $gitreposcriptroot\$gitscriptname" + +echo "Arguments used: $*" +echo "" + +# Let's quit on interrupt of subcommands +trap ' + trap - INT # restore default INT handler + echo "Interrupted" + kill -s INT "$$" +' INT + +lowercase(){ + echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" +} + +OS=`lowercase \`uname\`` +KERNEL=`uname -r` +MACH=`uname -m` + +if [ "${OS}" == "windowsnt" ]; then + OS=windows + DistroBasedOn=windows +elif [ "${OS}" == "darwin" ]; then + OS=osx + DistroBasedOn=osx +else + OS=`uname` + if [ "${OS}" == "SunOS" ] ; then + OS=solaris + ARCH=`uname -p` + OSSTR="${OS} ${REV}(${ARCH} `uname -v`)" + DistroBasedOn=sunos + elif [ "${OS}" == "AIX" ] ; then + OSSTR="${OS} `oslevel` (`oslevel -r`)" + DistroBasedOn=aix + elif [ "${OS}" == "Linux" ] ; then + if [ -f /etc/redhat-release ] ; then + DistroBasedOn='redhat' + DIST=`cat /etc/redhat-release |sed s/\ release.*//` + PSUEDONAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//` + REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//` + elif [ -f /etc/SuSE-release ] ; then + DistroBasedOn='suse' + PSUEDONAME=`cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//` + REV=`cat /etc/SuSE-release | grep 'VERSION' | sed s/.*=\ //` + elif [ -f /etc/mandrake-release ] ; then + DistroBasedOn='mandrake' + PSUEDONAME=`cat /etc/mandrake-release | sed s/.*\(// | sed s/\)//` + REV=`cat /etc/mandrake-release | sed s/.*release\ // | sed s/\ .*//` + elif [ -f /etc/debian_version ] ; then + DistroBasedOn='debian' + DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'` + PSUEDONAME=`cat /etc/lsb-release | grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }'` + REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'` + fi + if [ -f /etc/UnitedLinux-release ] ; then + DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" + fi + OS=`lowercase $OS` + DistroBasedOn=`lowercase $DistroBasedOn` + readonly OS + readonly DIST + readonly DistroBasedOn + readonly PSUEDONAME + readonly REV + readonly KERNEL + readonly MACH + fi + +fi + +echo "Operating System Details:" +echo " OS: $OS" +echo " DIST: $DIST" +echo " DistroBasedOn: $DistroBasedOn" +echo " PSUEDONAME: $PSUEDONAME" +echo " REV: $REV" +echo " KERNEL: $KERNEL" +echo " MACH: $MACH" + +SCRIPTFOLDER=$(dirname $(readlink -f $0)) + +if [[ "'$*'" =~ appimage ]] ; then + if [ -f $SCRIPTFOLDER/appimage.sh ]; then + #Script files were copied local - use them + . $SCRIPTFOLDER/appimage.sh + else + #Script files are not local - pull from remote + echo "Could not find \"appimage.sh\" next to this script..." + echo "Pulling it from \"$gitreposcriptroot/appimage.sh\"" + bash <(wget -qO- $gitreposcriptroot/appimage.sh) $@ + fi +elif [ "$DistroBasedOn" == "redhat" ] || [ "$DistroBasedOn" == "debian" ] || [ "$DistroBasedOn" == "osx" ] || [ "$DistroBasedOn" == "suse" ]; then + echo "Configuring PowerShell Core Enviornment for: $DistroBasedOn $DIST $REV" + if [ -f $SCRIPTFOLDER/installpsh-$DistroBasedOn.sh ]; then + #Script files were copied local - use them + . $SCRIPTFOLDER/installpsh-$DistroBasedOn.sh + else + #Script files are not local - pull from remote + echo "Could not find \"installpsh-$DistroBasedOn.sh\" next to this script..." + echo "Pulling it from \"$gitreposcriptroot/installpsh-$DistroBasedOn.sh\"" + bash <(wget -qO- $gitreposcriptroot/installpsh-$DistroBasedOn.sh) $@ + 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 + diff --git a/tools/installpsh-debian.sh b/tools/installpsh-debian.sh new file mode 100644 index 00000000000..17738f203ba --- /dev/null +++ b/tools/installpsh-debian.sh @@ -0,0 +1,169 @@ +#!/bin/bash + +#Companion code for the blog https://cloudywindows.com +#call this code direction from the web with: +#bash <(wget -O - https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/pshcoredevenv-debian.sh) ARGUMENTS +#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) + +#Usage - if you do not have the ability to run scripts directly from the web, +# pull all files in this repo folder and execute, this script +# automatically prefers local copies of sub-scripts + +#Completely automated install requires a root account or sudo with a password requirement + +#Switches +# -includeide - the script is being run headless, do not perform actions that require response from the console +# -interactivetests - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts + +#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution + + +VERSION="1.1.2" +gitreposubpath="PowerShell/PowerShell/master" +gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" +gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" +thisinstallerdistro=debian +repobased=true +gitscriptname="installpsh-debian.psh" + +echo ; +echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" +echo "*** Current PowerShell Core Version: $currentpshversion" +echo "*** Original script is at: $gitreposcriptroot/$gitscriptname" +echo +echo "*** Arguments used: $*" + +#Verify The Installer Choice (for direct runs of this script) +lowercase(){ + #echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" + echo "$1" | tr [A-Z] [a-z] +} + +# Let's quit on interrupt of subcommands +trap ' + trap - INT # restore default INT handler + echo "Interrupted" + kill -s INT "$$" +' INT + +if [ "${OS}" == "windowsnt" ]; then + OS=windows + DistroBasedOn=windows +elif [ "${OS}" == "darwin" ]; then + OS=osx + DistroBasedOn=osx +else + OS=`uname` + if [ "${OS}" == "SunOS" ] ; then + OS=solaris + ARCH=`uname -p` + OSSTR="${OS} ${REV}(${ARCH} `uname -v`)" + DistroBasedOn=sunos + elif [ "${OS}" == "AIX" ] ; then + OSSTR="${OS} `oslevel` (`oslevel -r`)" + DistroBasedOn=aix + elif [ "${OS}" == "Linux" ] ; then + if [ -f /etc/redhat-release ] ; then + DistroBasedOn='redhat' + elif [ -f /etc/SuSE-release ] ; then + DistroBasedOn='suse' + elif [ -f /etc/mandrake-release ] ; then + DistroBasedOn='mandrake' + elif [ -f /etc/debian_version ] ; then + DistroBasedOn='debian' + fi + if [ -f /etc/UnitedLinux-release ] ; then + DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" + DistroBasedOn=unitedlinux + fi + OS=`lowercase $OS` + DistroBasedOn=`lowercase $DistroBasedOn` + fi +fi + +if [ "$DistroBasedOn" != "$thisinstallerdistro" ]; then + echo "*** This installer is only for $thisinstallerdistro and you are running $DistroBasedOn, please run \"$gitreporoot\install-powershell.sh\" to see if your distro is supported AND to auto-select the appropriate installer if it is." + exit 0 +fi + +## Check requirements and prerequisites + +#Only do SUDO if we are not root +SUDO='' +if (( $EUID != 0 )); then + SUDO='sudo' +fi + +#Check that sudo is available +if [[ "$SUDO" -eq "sudo" ]]; then + + $SUDO -v + if [ $? -ne 0 ]; then + echo "ERROR: You must either be root or be able to use sudo" >&2 + exit 5 + fi +fi + +#Collect any variation details if required for this distro +REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'` +#END Collect any variation details if required for this distro + +#If there are known incompatible versions of this distro, put the test, message and script exit here: + +#END Verify The Installer Choice + +##END Check requirements and prerequisites + +echo +echo "*** Installing PowerShell Core for $DistroBasedOn..." +if ! hash curl 2>/dev/null; then + echo "curl not found, installing..." + $SUDO apt-get install -y curl +fi +release=`curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v//g | sed s/,//g | sed s/\ //g` + +echo "*** Current version on git is: $currentversion, repo version may differ slightly..." +echo "*** Setting up PowerShell Core repo..." +# Import the public repository GPG keys +curl https://packages.microsoft.com/keys/microsoft.asc | $SUDO apt-key add - +#Add the Repo +curl https://packages.microsoft.com/config/ubuntu/$REV/prod.list | $SUDO tee /etc/apt/sources.list.d/microsoft.list +# Update apt-get +$SUDO apt-get update +# Install PowerShell +$SUDO apt-get install -y powershell + +powershell -noprofile -c '"Congratulations! PowerShell is installed at $PSHOME"' +success=$? + +if [[ "$success" != 0 ]]; then + echo "ERROR: PowerShell failed to install!" >&2 + exit "$success" +fi + +if [[ "'$*'" =~ includeide ]] ; then + echo + echo "*** Installing VS Code PowerShell IDE..." + echo "*** Setting up VS Code repo..." + curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg + $SUDO mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg + $SUDO sh -c 'echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' + $SUDO apt-get update + $SUDO apt-get install -y code + + echo + echo "*** Installing VS Code PowerShell Extension" + code --install-extension ms-vscode.PowerShell +fi + +if [[ "'$*'" =~ -interactivetesting ]] ; then + echo "*** Loading test code in VS Code" + curl -O ./testpowershell.ps1 https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/testpowershell.ps1 + code ./testpowershell.ps1 +fi + +if [[ "$repobased" == true ]] ; then + echo + echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core\n" +fi +echo "*** Install Complete" \ No newline at end of file diff --git a/tools/installpsh-osx.sh b/tools/installpsh-osx.sh new file mode 100644 index 00000000000..c8039129d68 --- /dev/null +++ b/tools/installpsh-osx.sh @@ -0,0 +1,185 @@ +#!/bin/bash + +#Companion code for the blog https://cloudywindows.com +#call this code direction from the web with: +#bash <(wget -O - https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/pshcoredevenv-debian.sh) ARGUMENTS +#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) + +#Usage - if you do not have the ability to run scripts directly from the web, +# pull all files in this repo folder and execute, this script +# automatically prefers local copies of sub-scripts + +#Completely automated install requires a root account or sudo with a password requirement + +#Switches +# -includeide - the script is being run headless, do not perform actions that require response from the console +# -interactivetests - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts + +#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution + + +VERSION="1.1.2" +gitreposubpath="PowerShell/PowerShell/master" +gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" +gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" +thisinstallerdistro=osx +repobased=true +gitscriptname="installpsh-osx.psh" + +echo "\n*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" +echo "*** Current PowerShell Core Version: $currentpshversion" +echo "*** Original script is at: $gitreposcriptroot/$gitscriptname" +echo "\n*** Arguments used: $* \n\n" + +# Let's quit on interrupt of subcommands +trap ' + trap - INT # restore default INT handler + echo "Interrupted" + kill -s INT "$$" +' INT + +#Verify The Installer Choice (for direct runs of this script) +lowercase(){ + echo "$1" | tr [A-Z] [a-z] +} +if [ "${OS}" == "windowsnt" ]; then + OS=windows + DistroBasedOn=windows +elif [ "${OS}" == "darwin" ]; then + OS=osx + DistroBasedOn=osx +else + OS=`uname` + if [ "${OS}" == "SunOS" ] ; then + OS=solaris + ARCH=`uname -p` + OSSTR="${OS} ${REV}(${ARCH} `uname -v`)" + DistroBasedOn=sunos + elif [ "${OS}" == "AIX" ] ; then + OSSTR="${OS} `oslevel` (`oslevel -r`)" + DistroBasedOn=aix + elif [ "${OS}" == "Linux" ] ; then + if [ -f /etc/redhat-release ] ; then + DistroBasedOn='redhat' + elif [ -f /etc/SuSE-release ] ; then + DistroBasedOn='suse' + elif [ -f /etc/mandrake-release ] ; then + DistroBasedOn='mandrake' + elif [ -f /etc/debian_version ] ; then + DistroBasedOn='debian' + fi + if [ -f /etc/UnitedLinux-release ] ; then + DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" + DistroBasedOn=unitedlinux + fi + OS=`lowercase $OS` + DistroBasedOn=`lowercase $DistroBasedOn` + fi +fi + +if [ "$DistroBasedOn" != "$thisinstallerdistro" ]; then + echo "*** This installer is only for $thisinstallerdistro and you are running $DistroBasedOn, please run \"$gitreporoot\install-powershell.sh\" to see if your distro is supported AND to auto-select the appropriate installer if it is." + exit 0 +fi + +## Check requirements and prerequisites + +#Only do SUDO if we are not root +SUDO='' +if (( $EUID != 0 )); then + SUDO='sudo' +fi + +#Check that sudo is available +if [[ "$SUDO" -eq "sudo" ]]; then + + $SUDO -v + if [ $? -ne 0]; then + echo "ERROR: You must either be root or be able to use sudo" >&2 + exit 5 + fi +fi + +#END Collect any variation details if required for this distro + +#If there are known incompatible versions of this distro, put the test, message and script exit here: + +#END Verify The Installer Choice + +##END Check requirements and prerequisites + +echo "\n*** Installing PowerShell Core for $DistroBasedOn..." + +#release=`curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v//g | sed s/,//g | sed s/\ //g` + +if ! hash brew 2>/dev/null; then + echo "Homebrew is not found, installing..." + $SUDO ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null +fi + +if hash brew 2>/dev/null; then + echo "ERROR: brew did not install correctly, exiting..." >&2 + exit 3 +fi + +if [[ ! -d $(brew --prefix openssl) ]]; then + echo "Installing OpenSSL..." + if ! $SUDO brew install openssl; then + echo "ERROR: OpenSSL failed to install! Crypto functions will not work..." >&2 + fi +else + $SUDO brew upgrade openssl +fi + +if [[ ! -d $(brew --prefix curl) ]]; then + if ! $SUDO brew install curl --with-openssl; then + echo "ERROR: curl failed to build against OpenSSL; SSL functions will not work..." >&2 + fi +else + if ! $SUDO brew reinstall curl --with-openssl; then + echo "ERROR: curl failed to build against OpenSSL; SSL functions will not work..." >&2 + fi +fi + +if [[ ! -d $(brew --prefix powershell) ]]; then + if ! $SUDO brew install powershell; then + echo "ERROR: powershell failed to install..." >&2 + exit 1 + fi +else + $SUDO brew upgrade powershell +fi + +if [[ "'$*'" =~ includeide ]] ; then + echo "\n*** Installing VS Code PowerShell IDE..." + if [[ ! -d $(brew --prefix visual-studio-code) ]]; then + if ! $SUDO brew install visual-studio-code; then + echo "ERROR: Visual Studio Code failed to install..." >&2 + exit 1 + fi + else + $SUDO brew upgrade visual-studio-code + fi + + echo "\n*** Installing VS Code PowerShell Extension" + $SUDO code --install-extension ms-vscode.PowerShell +fi + +powershell -noprofile -c '"Congratulations! PowerShell is installed at $PSHOME"' +success=$? + +if [[ "$success" != 0 ]]; then + echo "ERROR: PowerShell failed to install!" >&2 + exit "$success" +fi + +if [[ "'$*'" =~ -interactivetesting ]] ; then + echo "*** Loading test code in VS Code" + $SUDO curl -O ./testpowershell.ps1 https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/testpowershell.ps1 + code ./testpowershell.ps1 +fi + +if [[ "$repobased" == true ]] ; then + echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" +fi +echo "*** Install Complete" \ No newline at end of file diff --git a/tools/installpsh-redhat.sh b/tools/installpsh-redhat.sh new file mode 100644 index 00000000000..d0ab19cf475 --- /dev/null +++ b/tools/installpsh-redhat.sh @@ -0,0 +1,162 @@ +#!/bin/bash + +#Companion code for the blog https://cloudywindows.com +#call this code direction from the web with: +#bash <(wget -O - https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/pshcoredevenv-debian.sh) ARGUMENTS +#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) + +#Usage - if you do not have the ability to run scripts directly from the web, +# pull all files in this repo folder and execute, this script +# automatically prefers local copies of sub-scripts + +#Completely automated install requires a root account or sudo with a password requirement + +#Switches +# -includeide - the script is being run headless, do not perform actions that require response from the console +# -interactivetests - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts + +#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution + + +VERSION="1.1.2" +gitreposubpath="PowerShell/PowerShell/master" +gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" +gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" +thisinstallerdistro=redhat +repobased=true +gitscriptname="installpsh-redhat.psh" + +echo +echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" +echo "*** Current PowerShell Core Version: $currentpshversion" +echo "*** Original script is at: $gitreposcriptroot/$gitscriptname" +echo +echo "*** Arguments used: $* " +echo + +# Let's quit on interrupt of subcommands +trap ' + trap - INT # restore default INT handler + echo "Interrupted" + kill -s INT "$$" +' INT + +#Verify The Installer Choice (for direct runs of this script) +lowercase(){ + #echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" + echo "$1" | tr [A-Z] [a-z] +} +if [ "${OS}" == "windowsnt" ]; then + OS=windows + DistroBasedOn=windows +elif [ "${OS}" == "darwin" ]; then + OS=osx + DistroBasedOn=osx +else + OS=`uname` + if [ "${OS}" == "SunOS" ] ; then + OS=solaris + ARCH=`uname -p` + OSSTR="${OS} ${REV}(${ARCH} `uname -v`)" + DistroBasedOn=sunos + elif [ "${OS}" == "AIX" ] ; then + OSSTR="${OS} `oslevel` (`oslevel -r`)" + DistroBasedOn=aix + elif [ "${OS}" == "Linux" ] ; then + if [ -f /etc/redhat-release ] ; then + DistroBasedOn='redhat' + elif [ -f /etc/SuSE-release ] ; then + DistroBasedOn='suse' + elif [ -f /etc/mandrake-release ] ; then + DistroBasedOn='mandrake' + elif [ -f /etc/debian_version ] ; then + DistroBasedOn='debian' + fi + if [ -f /etc/UnitedLinux-release ] ; then + DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" + DistroBasedOn=unitedlinux + fi + OS=`lowercase $OS` + DistroBasedOn=`lowercase $DistroBasedOn` + fi +fi + +if [ "$DistroBasedOn" != "$thisinstallerdistro" ]; then + echo "*** This installer is only for $thisinstallerdistro and you are running $DistroBasedOn, please run \"$gitreporoot\install-powershell.sh\" to see if your distro is supported AND to auto-select the appropriate installer if it is." + exit 0 +fi + +## Check requirements and prerequisites + +#Only do SUDO if we are not root +SUDO='' +if (( $EUID != 0 )); then + SUDO='sudo' +fi + +#Check that sudo is available +if [[ "$SUDO" -eq "sudo" ]]; then + + $SUDO -v + if [ $? -ne 0 ]; then + echo "ERROR: You must either be root or be able to use sudo" >&2 + exit 5 + fi +fi + +#Collect any variation details if required for this distro + +#END Collect any variation details if required for this distro + +#If there are known incompatible versions of this distro, put the test, message and script exit here: + +#END Verify The Installer Choice + +##END Check requirements and prerequisites + +echo +echo "*** Installing PowerShell Core for $DistroBasedOn..." +if ! hash curl 2>/dev/null; then + echo "curl not found, installing..." + $SUDO yum install -y curl +fi +release=`curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v//g | sed s/,//g | sed s/\ //g` + +echo "*** Current version on git is: $release, repo version may differ slightly..." + +echo "*** Setting up PowerShell Core repo..." +$SUDO curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo +$SUDO yum install -y powershell + +powershell -noprofile -c '"Congratulations! PowerShell is installed at $PSHOME"' +success=$? + +if [[ "$success" != 0 ]]; then + echo "ERROR: PowerShell failed to install!" >&2 + exit "$success" +fi + +if [[ "'$*'" =~ includeide ]] ; then + echo + echo "*** Installing VS Code PowerShell IDE..." + echo "*** Setting up VS Code repo..." + $SUDO rpm --import https://packages.microsoft.com/keys/microsoft.asc + $SUDO sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' + yum check-update + $SUDO yum install -y code + + echo + echo "*** Installing VS Code PowerShell Extension" + code --install-extension ms-vscode.PowerShell +fi + +if [[ "'$*'" =~ -interactivetesting ]] ; then + echo "*** Loading test code in VS Code" + curl -O ./testpowershell.ps1 https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/testpowershell.ps1 + code ./testpowershell.ps1 +fi + +if [[ "$repobased" == true ]] ; then + echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" +fi +echo "*** Install Complete" \ No newline at end of file diff --git a/tools/installpsh-suse.sh b/tools/installpsh-suse.sh new file mode 100644 index 00000000000..c0c55d198ac --- /dev/null +++ b/tools/installpsh-suse.sh @@ -0,0 +1,192 @@ +#!/bin/bash + +#Companion code for the blog https://cloudywindows.com +#call this code direction from the web with: +#bash <(wget -O - https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/pshcoredevenv-debian.sh) ARGUMENTS +#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) + +#Usage - if you do not have the ability to run scripts directly from the web, +# pull all files in this repo folder and execute, this script +# automatically prefers local copies of sub-scripts + +#Completely automated install requires a root account or sudo with a password requirement + +#Switches +# -includeide - the script is being run headless, do not perform actions that require response from the console +# -interactivetests - requires a human user in front of the machine - loads a script into the ide to test with F5 to ensure the IDE can run scripts + +#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution + + +VERSION="1.1.2" +gitreposubpath="PowerShell/PowerShell/master" +gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" +gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" +thisinstallerdistro=suse +repobased=true +gitscriptname="installpsh-suse.psh" + +echo +echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" +echo "*** Current PowerShell Core Version: $currentpshversion" +echo "*** Original script is at: $gitreposcriptroot/$gitscriptname" +echo +echo "*** Arguments used: $*" +echo + +# Let's quit on interrupt of subcommands +trap ' + trap - INT # restore default INT handler + echo "Interrupted" + kill -s INT "$$" +' INT + +#Verify The Installer Choice (for direct runs of this script) +lowercase(){ + #echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" + echo "$1" | tr [A-Z] [a-z] +} +if [ "${OS}" == "windowsnt" ]; then + OS=windows + DistroBasedOn=windows +elif [ "${OS}" == "darwin" ]; then + OS=osx + DistroBasedOn=osx +else + OS=`uname` + if [ "${OS}" == "SunOS" ] ; then + OS=solaris + ARCH=`uname -p` + OSSTR="${OS} ${REV}(${ARCH} `uname -v`)" + DistroBasedOn=sunos + elif [ "${OS}" == "AIX" ] ; then + OSSTR="${OS} `oslevel` (`oslevel -r`)" + DistroBasedOn=aix + elif [ "${OS}" == "Linux" ] ; then + if [ -f /etc/redhat-release ] ; then + DistroBasedOn='redhat' + elif [ -f /etc/SuSE-release ] ; then + DistroBasedOn='suse' + elif [ -f /etc/mandrake-release ] ; then + DistroBasedOn='mandrake' + elif [ -f /etc/debian_version ] ; then + DistroBasedOn='debian' + fi + if [ -f /etc/UnitedLinux-release ] ; then + DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION//`]" + DistroBasedOn=unitedlinux + fi + OS=`lowercase $OS` + DistroBasedOn=`lowercase $DistroBasedOn` + fi +fi + +if [ "$DistroBasedOn" != "$thisinstallerdistro" ]; then + echo "*** This installer is only for $thisinstallerdistro and you are running $DistroBasedOn, please run \"$gitreporoot\install-powershell.sh\" to see if your distro is supported AND to auto-select the appropriate installer if it is." + exit 0 +fi + +## Check requirements and prerequisites + +#Only do SUDO if we are not root +SUDO='' +if (( $EUID != 0 )); then + SUDO='sudo' +fi + +#Check that sudo is available +if [[ "$SUDO" -eq "sudo" ]]; then + + $SUDO -v + if [ $? -ne 0 ]; then + echo "ERROR: You must either be root or be able to use sudo" >&2 + exit 5 + fi +fi + +#Collect any variation details if required for this distro +REV=`cat /etc/SuSE-release | grep 'VERSION' | sed s/.*=\ //` +MAJORREV=`echo $REV | sed 's/\..*//'` +#END Collect any variation details if required for this distro + +#If there are known incompatible versions of this distro, put the test, message and script exit here: +if [[ $MAJORREV < 42 ]]; then + echo "OpenSUSE $VERSION_ID is not supported!" >&2 + exit 2 +fi + +#END Verify The Installer Choice + + +##END Check requirements and prerequisites + +echo +echo "*** Installing PowerShell Core for $DistroBasedOn..." +if ! hash curl 2>/dev/null; then + echo "curl not found, installing..." + $SUDO zypper install -y curl +fi +release=`curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v//g | sed s/,//g | sed s/\ //g` + +#REPO BASED (Not ready yet) +#echo "*** Setting up PowerShell Core repo..." +#echo "*** Current version on git is: $release, repo version may differ slightly..." +## Install the Microsoft public key so that zypper trusts the package +#sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc +##Add the Repo +#$SUDO sh -c 'echo -e "[code]\nname=PowerShell Core\nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-sles12-prod\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/powershellcore.repo' +## Update zypper +#$SUDO zypper refresh +## Install PowerShell +#$SUDO zypper --non-interactive install powershell + +#DIRECT DOWNLOAD +packagerel=`echo $release | sed 's/-/_/'` +package=powershell-${packagerel}-1.suse.42.1.x86_64.rpm +downloadurl=https://github.com/PowerShell/PowerShell/releases/download/v$release/$package + +echo "Destination file: $package" +echo "Source URL: $downloadurl" + +curl -L -o "$package" "$downloadurl" + +if [[ ! -r "$package" ]]; then + echo "ERROR: $package failed to download! Aborting..." >&2 + exit 1 +fi + +sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc +sudo zypper --non-interactive install "./$package" + +powershell -noprofile -c '"Congratulations! PowerShell is installed at $PSHOME"' +success=$? + +if [[ "$success" != 0 ]]; then + echo "ERROR: PowerShell failed to install!" >&2 + exit "$success" +fi + +if [[ "'$*'" =~ includeide ]] ; then + echo + echo "*** Installing VS Code PowerShell IDE..." + echo "*** Setting up VS Code repo..." + $SUDO sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/vscode.repo' + $SUDO zypper refresh + $SUDO zypper --non-interactive install code + + echo + echo "*** Installing VS Code PowerShell Extension" + code --install-extension ms-vscode.PowerShell +fi + + +if [[ "'$*'" =~ -interactivetesting ]] ; then + echo "*** Loading test code in VS Code" + curl -O ./testpowershell.ps1 https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/testpowershell.ps1 + code ./testpowershell.ps1 +fi + +if [[ "$repobased" == true ]] ; then + echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" +fi +echo "*** Install Complete" \ No newline at end of file From fdabe868800b19c53976cbc201b7572a6f37236a Mon Sep 17 00:00:00 2001 From: DarwinJS Date: Thu, 27 Apr 2017 13:14:25 -0400 Subject: [PATCH 2/3] trying apostrophes rename md to have only one period fix md spelling mistakes Fixes to markdown to follow strict syntax create readme --- tools/install-powershell-readme.md | 66 ++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 tools/install-powershell-readme.md diff --git a/tools/install-powershell-readme.md b/tools/install-powershell-readme.md new file mode 100644 index 00000000000..d77c9a33780 --- /dev/null +++ b/tools/install-powershell-readme.md @@ -0,0 +1,66 @@ +# install-powershell.sh + +## Features of install-powershell.sh + +* can be called directly from git +* optionally installs vs code and vs powershell extension (aka PowerShell IDE) using optional `-includeide` switch +* defaults to completely automated operation (if appropriate permissions are available) +* automatically looks up latest version via git tags +* automatic selection of appropriate install sub-script +* configures software installs for repositories when repositories are in place, otherwise pulls files from git releases. As repository versions are made available, script will be updated to take advantage. +* user permission checking +* sub-installers called from local file system if they exist, otherwise pulled from git +* sub-installers can be called directly if auto-selection is not needed + +## Minimum Requirements for install-powershell.sh + +* bash shell +* `sed` +* native package manager available +* `curl` (auto-installed if missing) + +## Usage + +### Direct from Github + +```bash +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 +``` + +### Local Copy + +```bash +bash install-powershell.sh +``` + +## Examples + +### Only Install PowerShell Core: + +```bash +bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) +``` + +### Install PowerShell Core with IDE: + +```bash +bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -includeide +``` + +### Install PowerShell Core with IDE and do tests that require a human to interact with the install process: + +```bash +bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -includeide -interactivetesting +``` + +### Install AppImage: + +```bash +bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -appimage +``` + +### Installation To do list + +* Detect and wait when package manager is busy/locked? - at least Ubuntu (CentOS does this internally) \ No newline at end of file From e4dc9387320ec0107f3efecb25f2cdadebcdadbe Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 21 Jul 2017 14:20:51 -0700 Subject: [PATCH 3/3] Get macOS working and fix misc issue --- .spelling | 7 ++++ .travis.yml | 2 +- test/common/markdown/markdown.tests.ps1 | 1 + tools/install-powershell-readme.md | 8 ++-- tools/install-powershell.sh | 8 ++-- tools/installpsh-debian.sh | 3 +- tools/installpsh-osx.sh | 51 +++++++++++-------------- tools/installpsh-redhat.sh | 3 +- tools/installpsh-suse.sh | 3 +- 9 files changed, 43 insertions(+), 43 deletions(-) mode change 100644 => 100755 tools/install-powershell.sh mode change 100644 => 100755 tools/installpsh-debian.sh mode change 100644 => 100755 tools/installpsh-osx.sh mode change 100644 => 100755 tools/installpsh-redhat.sh mode change 100644 => 100755 tools/installpsh-suse.sh diff --git a/.spelling b/.spelling index 0b8d95d1482..73945422253 100644 --- a/.spelling +++ b/.spelling @@ -889,6 +889,10 @@ WebRequest win7-x86 WindowsVersion XPath +alpha.18 +behavioral +MiaRomero +TheFlyingCorpse Youtube - test/tools/CodeCoverageAutomation/README.md CodeCoverage.zip @@ -914,3 +918,6 @@ post-6 - CODE_OF_CONDUCT.md opencode microsoft.com + - ./tools/install-powershell.readme.md +includeide +sed diff --git a/.travis.yml b/.travis.yml index 1747a4fa5aa..6bd3fd23fb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ addons: install: - pushd tools - - ./download.sh + - ./install-powershell.sh - popd # Default 2.0.0 Ruby is buggy # Default bundler version is buggy diff --git a/test/common/markdown/markdown.tests.ps1 b/test/common/markdown/markdown.tests.ps1 index bc32c1017e2..51d99cd88c7 100644 --- a/test/common/markdown/markdown.tests.ps1 +++ b/test/common/markdown/markdown.tests.ps1 @@ -78,6 +78,7 @@ Describe 'Common Tests - Validate Markdown Files' -Tag 'CI' { './docs/maintainers/README.md' './demos/SSHRemoting/*.md' './docker/*.md' + './tools/*.md' ) $filter = ($docsToTest -join ',') &"gulp" test-mdsyntax --silent ` diff --git a/tools/install-powershell-readme.md b/tools/install-powershell-readme.md index d77c9a33780..08c7bddfdac 100644 --- a/tools/install-powershell-readme.md +++ b/tools/install-powershell-readme.md @@ -37,25 +37,25 @@ bash install-powershell.sh ## Examples -### Only Install PowerShell Core: +### Only Install PowerShell Core ```bash bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) ``` -### Install PowerShell Core with IDE: +### Install PowerShell Core with IDE ```bash bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -includeide ``` -### Install PowerShell Core with IDE and do tests that require a human to interact with the install process: +### Install PowerShell Core with IDE and do tests that require a human to interact with the installation process ```bash bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -includeide -interactivetesting ``` -### Install AppImage: +### Install AppImage ```bash bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -appimage diff --git a/tools/install-powershell.sh b/tools/install-powershell.sh old mode 100644 new mode 100755 index 90f3b2e4cf2..2df3d60574e --- a/tools/install-powershell.sh +++ b/tools/install-powershell.sh @@ -23,7 +23,6 @@ VERSION="1.1.0" gitreposubpath="PowerShell/PowerShell/master" -gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" gitscriptname="install-powershell.psh" @@ -52,10 +51,14 @@ MACH=`uname -m` if [ "${OS}" == "windowsnt" ]; then OS=windows DistroBasedOn=windows + SCRIPTFOLDER=$(dirname $(readlink -f $0)) elif [ "${OS}" == "darwin" ]; then OS=osx DistroBasedOn=osx + # readlink doesn't work the same on macOS + SCRIPTFOLDER=$(dirname $0) else + SCRIPTFOLDER=$(dirname $(readlink -f $0)) OS=`uname` if [ "${OS}" == "SunOS" ] ; then OS=solaris @@ -110,7 +113,7 @@ echo " REV: $REV" echo " KERNEL: $KERNEL" echo " MACH: $MACH" -SCRIPTFOLDER=$(dirname $(readlink -f $0)) + if [[ "'$*'" =~ appimage ]] ; then if [ -f $SCRIPTFOLDER/appimage.sh ]; then @@ -136,4 +139,3 @@ elif [ "$DistroBasedOn" == "redhat" ] || [ "$DistroBasedOn" == "debian" ] || [ " else echo "Sorry, your operating system is based on $DistroBasedOn and is not supported by PowerShell Core or this installer at this time." fi - diff --git a/tools/installpsh-debian.sh b/tools/installpsh-debian.sh old mode 100644 new mode 100755 index 17738f203ba..acec6402b91 --- a/tools/installpsh-debian.sh +++ b/tools/installpsh-debian.sh @@ -20,7 +20,6 @@ VERSION="1.1.2" gitreposubpath="PowerShell/PowerShell/master" -gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" thisinstallerdistro=debian repobased=true @@ -166,4 +165,4 @@ if [[ "$repobased" == true ]] ; then echo echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core\n" fi -echo "*** Install Complete" \ No newline at end of file +echo "*** Install Complete" diff --git a/tools/installpsh-osx.sh b/tools/installpsh-osx.sh old mode 100644 new mode 100755 index c8039129d68..48595bba913 --- a/tools/installpsh-osx.sh +++ b/tools/installpsh-osx.sh @@ -20,11 +20,10 @@ VERSION="1.1.2" gitreposubpath="PowerShell/PowerShell/master" -gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" thisinstallerdistro=osx repobased=true -gitscriptname="installpsh-osx.psh" +gitscriptname="installpsh-osx.sh" echo "\n*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" echo "*** Current PowerShell Core Version: $currentpshversion" @@ -42,6 +41,9 @@ trap ' lowercase(){ echo "$1" | tr [A-Z] [a-z] } + +OS=`lowercase \`uname\`` + if [ "${OS}" == "windowsnt" ]; then OS=windows DistroBasedOn=windows @@ -114,55 +116,46 @@ echo "\n*** Installing PowerShell Core for $DistroBasedOn..." if ! hash brew 2>/dev/null; then echo "Homebrew is not found, installing..." - $SUDO ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null +else + echo "Howebrew is already installed, skipping..." fi -if hash brew 2>/dev/null; then +if ! hash brew 2>/dev/null; then echo "ERROR: brew did not install correctly, exiting..." >&2 exit 3 fi -if [[ ! -d $(brew --prefix openssl) ]]; then - echo "Installing OpenSSL..." - if ! $SUDO brew install openssl; then - echo "ERROR: OpenSSL failed to install! Crypto functions will not work..." >&2 - fi -else - $SUDO brew upgrade openssl -fi - -if [[ ! -d $(brew --prefix curl) ]]; then - if ! $SUDO brew install curl --with-openssl; then - echo "ERROR: curl failed to build against OpenSSL; SSL functions will not work..." >&2 - fi -else - if ! $SUDO brew reinstall curl --with-openssl; then - echo "ERROR: curl failed to build against OpenSSL; SSL functions will not work..." >&2 +# Suppress output, it's very noisy on travis-ci +if [[ ! -d $(brew --prefix cask) ]]; then + echo "Installing cask..." + if ! brew tap caskroom/cask >/dev/null; then + echo "ERROR: Cask failed to install! Cannot install powershell..." >&2 fi fi -if [[ ! -d $(brew --prefix powershell) ]]; then - if ! $SUDO brew install powershell; then - echo "ERROR: powershell failed to install..." >&2 - exit 1 +if ! hash powershell 2>/dev/null; then + echo "Installing PowerShell..." + if ! brew cask install powershell; then + echo "ERROR: PowerShell failed to install! Cannot install powershell..." >&2 fi else - $SUDO brew upgrade powershell + echo "PowerShell is already installed, skipping..." fi if [[ "'$*'" =~ includeide ]] ; then echo "\n*** Installing VS Code PowerShell IDE..." if [[ ! -d $(brew --prefix visual-studio-code) ]]; then - if ! $SUDO brew install visual-studio-code; then + if ! brew install visual-studio-code; then echo "ERROR: Visual Studio Code failed to install..." >&2 exit 1 fi else - $SUDO brew upgrade visual-studio-code + brew upgrade visual-studio-code fi echo "\n*** Installing VS Code PowerShell Extension" - $SUDO code --install-extension ms-vscode.PowerShell + code --install-extension ms-vscode.PowerShell fi powershell -noprofile -c '"Congratulations! PowerShell is installed at $PSHOME"' @@ -182,4 +175,4 @@ fi if [[ "$repobased" == true ]] ; then echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" fi -echo "*** Install Complete" \ No newline at end of file +echo "*** Install Complete" diff --git a/tools/installpsh-redhat.sh b/tools/installpsh-redhat.sh old mode 100644 new mode 100755 index d0ab19cf475..861031b8175 --- a/tools/installpsh-redhat.sh +++ b/tools/installpsh-redhat.sh @@ -20,7 +20,6 @@ VERSION="1.1.2" gitreposubpath="PowerShell/PowerShell/master" -gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" thisinstallerdistro=redhat repobased=true @@ -159,4 +158,4 @@ fi if [[ "$repobased" == true ]] ; then echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" fi -echo "*** Install Complete" \ No newline at end of file +echo "*** Install Complete" diff --git a/tools/installpsh-suse.sh b/tools/installpsh-suse.sh old mode 100644 new mode 100755 index c0c55d198ac..067dea491b8 --- a/tools/installpsh-suse.sh +++ b/tools/installpsh-suse.sh @@ -20,7 +20,6 @@ VERSION="1.1.2" gitreposubpath="PowerShell/PowerShell/master" -gitreposubpath="darwinjs/PowerShell/feature/install-powershell.sh" gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools" thisinstallerdistro=suse repobased=true @@ -189,4 +188,4 @@ fi if [[ "$repobased" == true ]] ; then echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core" fi -echo "*** Install Complete" \ No newline at end of file +echo "*** Install Complete"