@@ -25,10 +25,10 @@ thisinstallerdistro=osx |
25 | 25 | repobased=true |
26 | 26 | gitscriptname="installpsh-osx.sh" |
27 | 27 |
|
28 | | -echo "\n*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" |
| 28 | +echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro" |
29 | 29 | echo "*** Current PowerShell Core Version: $currentpshversion" |
30 | 30 | echo "*** Original script is at: $gitreposcriptroot/$gitscriptname" |
31 | | -echo "\n*** Arguments used: $* \n\n" |
| 31 | +echo "*** Arguments used: $*" |
32 | 32 |
|
33 | 33 | # Let's quit on interrupt of subcommands |
34 | 34 | trap ' |
@@ -93,14 +93,13 @@ if (( $EUID != 0 )); then |
93 | 93 | fi |
94 | 94 |
|
95 | 95 | #Check that sudo is available |
96 | | -if [[ "$SUDO" -eq "sudo" ]]; then |
97 | | - |
98 | | - $SUDO -v |
99 | | - if [ $? -ne 0]; then |
100 | | - echo "ERROR: You must either be root or be able to use sudo" >&2 |
101 | | - exit 5 |
102 | | - fi |
103 | | -fi |
| 96 | +#if [[ "$SUDO" -eq "sudo" ]]; then |
| 97 | +# $SUDO -v |
| 98 | +# if [ $? -ne 0 ]; then |
| 99 | +# echo "ERROR: You must either be root or be able to use sudo" >&2 |
| 100 | +# exit 5 |
| 101 | +# fi |
| 102 | +#fi |
104 | 103 |
|
105 | 104 | #END Collect any variation details if required for this distro |
106 | 105 |
|
|
110 | 109 |
|
111 | 110 | ##END Check requirements and prerequisites |
112 | 111 |
|
113 | | -echo "\n*** Installing PowerShell Core for $DistroBasedOn..." |
| 112 | +echo "*** Installing PowerShell Core for $DistroBasedOn..." |
114 | 113 |
|
115 | 114 | #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` |
116 | 115 |
|
@@ -126,6 +125,13 @@ if ! hash brew 2>/dev/null; then |
126 | 125 | exit 3 |
127 | 126 | fi |
128 | 127 |
|
| 128 | +# Suppress output, it's very noisy on travis-ci |
| 129 | +echo "Refreshing Homebrew cache..." |
| 130 | +if ! brew update > /dev/null; then |
| 131 | + echo "ERROR: Refreshing Homebrew cache failed..." >&2 |
| 132 | + exit 2 |
| 133 | +fi |
| 134 | + |
129 | 135 | # Suppress output, it's very noisy on travis-ci |
130 | 136 | if [[ ! -d $(brew --prefix cask) ]]; then |
131 | 137 | echo "Installing cask..." |
@@ -135,13 +141,6 @@ if [[ ! -d $(brew --prefix cask) ]]; then |
135 | 141 | fi |
136 | 142 | fi |
137 | 143 |
|
138 | | -# Suppress output, it's very noisy on travis-ci |
139 | | -echo "Refreshing Homebrew cache..." |
140 | | -if ! brew update >/dev/null; then |
141 | | - echo "ERROR: Refreshing Homebrew cache failed..." >&2 |
142 | | - exit 2 |
143 | | -fi |
144 | | - |
145 | 144 | if ! hash powershell 2>/dev/null; then |
146 | 145 | echo "Installing PowerShell..." |
147 | 146 | if ! brew cask install powershell; then |
|
152 | 151 | fi |
153 | 152 |
|
154 | 153 | if [[ "'$*'" =~ includeide ]] ; then |
155 | | - echo "\n*** Installing VS Code PowerShell IDE..." |
| 154 | + echo "*** Installing VS Code PowerShell IDE..." |
156 | 155 | if [[ ! -d $(brew --prefix visual-studio-code) ]]; then |
157 | 156 | if ! brew cask install visual-studio-code; then |
158 | 157 | echo "ERROR: Visual Studio Code failed to install..." >&2 |
@@ -162,7 +161,7 @@ if [[ "'$*'" =~ includeide ]] ; then |
162 | 161 | brew upgrade visual-studio-code |
163 | 162 | fi |
164 | 163 |
|
165 | | - echo "\n*** Installing VS Code PowerShell Extension" |
| 164 | + echo "*** Installing VS Code PowerShell Extension" |
166 | 165 | code --install-extension ms-vscode.PowerShell |
167 | 166 | fi |
168 | 167 |
|
|