|
4 | 4 | # |
5 | 5 | # Install OpenShell from a GitHub release. |
6 | 6 | # |
7 | | -# Linux installs either the Debian or RPM packages from the selected release. |
| 7 | +# Linux automatically installs the snap when the snap command is available and |
| 8 | +# the version is unset or dev; exact releases and prereleases use native packages. |
8 | 9 | # Apple Silicon macOS installs the generated Homebrew formula, so Homebrew owns |
9 | 10 | # the binary layout and launchd service lifecycle. |
10 | 11 | # |
@@ -63,19 +64,19 @@ ENVIRONMENT VARIABLES: |
63 | 64 | pre-v0.0.37 or non-snap installation. |
64 | 65 | OPENSHELL_INSTALL_METHOD |
65 | 66 | Linux package to install: snap, deb, or rpm. Unset |
66 | | - selects deb or rpm from the host package manager. |
| 67 | + selects snap when available, otherwise deb or rpm. |
67 | 68 |
|
68 | 69 | NOTES: |
69 | 70 | When OPENSHELL_VERSION is unset, this resolves the latest tagged release |
70 | 71 | from ${GITHUB_URL}/releases/latest. |
71 | 72 |
|
72 | | - Linux installs the Debian package on amd64/arm64 or the RPM packages on |
73 | | - x86_64/aarch64, depending on the host package manager. Set |
74 | | - OPENSHELL_INSTALL_METHOD=snap to install the OpenShell snap instead; hosts |
75 | | - that already have the OpenShell snap keep refreshing it. snap installs use |
76 | | - latest/stable by default and latest/edge for dev, and do not support |
77 | | - explicit release tags or prereleases. The OpenShell snap requires a running |
78 | | - Docker Engine installed from a system package or Docker's package |
| 73 | + Linux installs the OpenShell snap when the snap command is available and |
| 74 | + OPENSHELL_VERSION is unset or dev. Snap installs use latest/stable by |
| 75 | + default and latest/edge for dev. Explicit release tags and prereleases use |
| 76 | + the Debian package on amd64/arm64 or the RPM packages on x86_64/aarch64, |
| 77 | + depending on the host package manager. Set OPENSHELL_INSTALL_METHOD=deb or |
| 78 | + rpm to select a native package explicitly. The OpenShell snap requires a |
| 79 | + running Docker Engine installed from a system package or Docker's package |
79 | 80 | repository. The Docker snap is not currently compatible with OpenShell. |
80 | 81 | macOS installs the release Homebrew formula on Apple Silicon and starts a |
81 | 82 | brew services-backed local gateway. |
@@ -668,11 +669,9 @@ linux_package_method() { |
668 | 669 | *) error "unsupported OPENSHELL_INSTALL_METHOD=${OPENSHELL_INSTALL_METHOD}; use snap, deb, or rpm" ;; |
669 | 670 | esac |
670 | 671 |
|
671 | | - # Keep refreshing an existing snap install instead of adding a second |
672 | | - # gateway on the same port. |
673 | 672 | case "${OPENSHELL_VERSION:-}" in |
674 | 673 | '' | dev) |
675 | | - if has_cmd snap && snap list openshell >/dev/null 2>&1; then |
| 674 | + if has_cmd snap; then |
676 | 675 | echo "snap" |
677 | 676 | return 0 |
678 | 677 | fi |
@@ -1467,11 +1466,11 @@ install_linux_snap() { |
1467 | 1466 |
|
1468 | 1467 | if snap list docker >/dev/null 2>&1; then |
1469 | 1468 | error "the Docker snap is not currently compatible with OpenShell because its AppArmor confinement prevents OpenShell's hardened containers from starting. |
1470 | | -Remove the Docker snap and install Docker Engine from a system package or Docker's package repository, then rerun this installer." |
| 1469 | +Remove the Docker snap and install Docker Engine from a system package or Docker's package repository, then rerun this installer. To use a native OpenShell package instead, set OPENSHELL_INSTALL_METHOD=deb or OPENSHELL_INSTALL_METHOD=rpm." |
1471 | 1470 | fi |
1472 | 1471 | if ! has_cmd docker; then |
1473 | 1472 | error "Docker is required before installing the OpenShell snap. |
1474 | | -Install Docker Engine from a system package or Docker's package repository, then rerun this installer. The Docker snap is not currently compatible with OpenShell." |
| 1473 | +Install Docker Engine from a system package or Docker's package repository, then rerun this installer. The Docker snap is not currently compatible with OpenShell. To use a native OpenShell package instead, set OPENSHELL_INSTALL_METHOD=deb or OPENSHELL_INSTALL_METHOD=rpm." |
1475 | 1474 | fi |
1476 | 1475 | info "using existing Docker installation" |
1477 | 1476 | if [ "$_existing_mode" = user ]; then |
|
0 commit comments