Get macOS working and fix misc issue

This commit is contained in:
Travis Plunk
2017-07-25 17:55:42 -07:00
parent fdabe86880
commit e4dc938732
9 changed files with 43 additions and 43 deletions
+7
View File
@@ -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
+1 -1
View File
@@ -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
+1
View File
@@ -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 `
+4 -4
View File
@@ -37,25 +37,25 @@ bash install-powershell.sh <ARGUMENTS>
## 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
Regular → Executable
+5 -3
View File
@@ -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
Regular → Executable
+1 -2
View File
@@ -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"
echo "*** Install Complete"
Regular → Executable
+22 -29
View File
@@ -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"
echo "*** Install Complete"
Regular → Executable
+1 -2
View File
@@ -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"
echo "*** Install Complete"
Regular → Executable
+1 -2
View File
@@ -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"
echo "*** Install Complete"