Skip to content

Commit

Permalink
OpenSUSE42.1 docs update and download.sh (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisEz13 authored and daxian-dbw committed Apr 5, 2017
1 parent 8de8b19 commit 459b0b5
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ GoogleTest
superproject
- docs/installation/linux.md
OpenSUSE
TravisEz13
- docs/installation/windows.md
Install-PowerShellRemoting
pwrshplugin.dll
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ You can download and install a PowerShell package for any of the following platf
| Ubuntu 16.04 | [.deb][rl-ubuntu16] | [Instructions][in-ubuntu16] |
| Ubuntu 14.04 | [.deb][rl-ubuntu14] | [Instructions][in-ubuntu14] |
| CentOS 7 | [.rpm][rl-centos] | [Instructions][in-centos] |
| OpenSUSE 42.1 | [.rpm][rl-opensuse421] | [Instructions][in-opensuse421]|
| Arch Linux | | [Instructions][in-archlinux] |
| Many Linux distributions | [.AppImage][rl-ai] | [Instructions][in-appimage] |
| macOS 10.11 | [.pkg][rl-macos] | [Instructions][in-macos] |
Expand All @@ -41,6 +42,7 @@ You can download and install a PowerShell package for any of the following platf
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.17/powershell-6.0.0_alpha.17-1.el7.centos.x86_64.rpm
[rl-ai]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.17/PowerShell-x86_64.AppImage
[rl-macos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.17/powershell-6.0.0-alpha.17.pkg
[rl-opensuse421]: tbd

[installation]: docs/installation
[in-windows]: docs/installation/windows.md#msi
Expand All @@ -51,6 +53,7 @@ You can download and install a PowerShell package for any of the following platf
[in-appimage]: docs/installation/linux.md#linux-appimage
[in-macos]: docs/installation/linux.md#macos-1011
[in-docker]: docker
[in-opensuse421]: docs/installation/linux.md#opensuse-421

To install a specific version, visit [releases](https://github.com/PowerShell/PowerShell/releases).

Expand Down
33 changes: 33 additions & 0 deletions docs/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,39 @@ sudo yum remove powershell

[CentOS 7]: https://www.centos.org/download/

## OpenSUSE 42.1

Installation instruction for OpenSUSE 42.1.

**Note:** OpenSUSE package will be released as part of the alpha 18 release.
@TravisEz13 Has built an unofficial package of alpha 17 which is available in the [fork's release](https://github.com/TravisEz13/PowerShell/releases/tag/v6.0.0-alpha.17).

### Installation via Direct Download - OpenSUSE 42.1

Using [OpenSUSE 42.1][], download the RPM package
`powershell-6.0.0_alpha.17-1.suse.42.1.x86_64.rpm`
from the [releases][] page onto the OpenSUSE machine.

Then execute the following in the terminal:

```sh
sudo zypper install ./powershell-6.0.0_alpha.17-1.suse.42.1.x86_64.rpm
```

You can also install the RPM without the intermediate step of downloading it:

```sh
sudo zypper install https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.17/powershell-6.0.0_alpha.17-1.suse.42.1.x86_64.rpm
```

### Uninstallation - OpenSUSE 42.1

```sh
sudo zypper remove powershell
```

[OpenSUSE 42.1]: https://software.opensuse.org/421/en

## Arch Linux

PowerShell is available from the [Arch Linux][] User Repository (AUR) as a [release][arch-release] or the [latest development build][arch-git].
Expand Down
18 changes: 15 additions & 3 deletions tools/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ trap '
' INT

get_url() {
fork=$2
release=v6.0.0-alpha.17
echo "https://github.com/PowerShell/PowerShell/releases/download/$release/$1"
echo "https://github.com/$fork/PowerShell/releases/download/$release/$1"
}

fork="PowerShell"
# Get OS specific asset ID and package name
case "$OSTYPE" in
linux*)
Expand Down Expand Up @@ -50,7 +52,17 @@ case "$OSTYPE" in
sudo zypper install -y curl
fi

package=powershell-6.0.0_alpha.17-1.suse.13.2.x86_64.rpm

case "$VERSION_ID" in
42.1)
# TODO during next release remove fork and fix package name
fork=TravisEz13
package=powershell-6.0.0_alpha.17_41_g8598a51-1.suse.42.1.x86_64.rpm
;;
*)
echo "OpenSUSE $VERSION_ID is not supported!" >&2
exit 2
esac
;;
*)
echo "$NAME is not supported!" >&2
Expand All @@ -67,7 +79,7 @@ case "$OSTYPE" in
;;
esac

curl -L -o "$package" $(get_url "$package")
curl -L -o "$package" $(get_url "$package" "$fork")

if [[ ! -r "$package" ]]; then
echo "ERROR: $package failed to download! Aborting..." >&2
Expand Down

0 comments on commit 459b0b5

Please sign in to comment.