|
2 | 2 | set -eu
|
3 | 3 |
|
4 | 4 | # code-server's automatic install script.
|
5 |
| -# See https://github.com/cdr/code-server/blob/main/docs/install.md |
| 5 | +# See https://github.com/cdr/code-server/blob/main/docs/install |
6 | 6 |
|
7 | 7 | usage() {
|
8 | 8 | arg0="$0"
|
|
58 | 58 | - If Homebrew is not installed it will install the latest standalone release
|
59 | 59 | into ~/.local
|
60 | 60 |
|
61 |
| -- For FreeBSD, it will install the npm package with yarn or npm. |
| 61 | +- For FreeBSD or Alpine, it will install the npm package with yarn or npm. |
62 | 62 |
|
63 | 63 | - If ran on an architecture with no releases, it will install the
|
64 | 64 | npm package with yarn or npm.
|
|
67 | 67 |
|
68 | 68 | It will cache all downloaded assets into ~/.cache/code-server
|
69 | 69 |
|
70 |
| -More installation docs are at https://github.com/cdr/code-server/blob/main/docs/install.md |
| 70 | +More installation docs are at https://coder.com/docs/code-server/v3.10.2/install |
71 | 71 | EOF
|
72 | 72 | }
|
73 | 73 |
|
@@ -238,6 +238,17 @@ main() {
|
238 | 238 | return
|
239 | 239 | fi
|
240 | 240 |
|
| 241 | + if [ "$OS" = "linux" ] && [ "$(distro)" = "alpine" ]; then |
| 242 | + if [ "$METHOD" = standalone ]; then |
| 243 | + echoerr "No precompiled releases available for alpine." |
| 244 | + echoerr 'Please rerun without the "--method standalone" flag to install from npm.' |
| 245 | + exit 1 |
| 246 | + fi |
| 247 | + echoh "No precompiled releases available for alpine." |
| 248 | + install_npm |
| 249 | + return |
| 250 | + fi |
| 251 | + |
241 | 252 | CACHE_DIR="$(echo_cache_dir)"
|
242 | 253 |
|
243 | 254 | if [ "$METHOD" = standalone ]; then
|
@@ -419,7 +430,7 @@ install_npm() {
|
419 | 430 | echoh
|
420 | 431 | echoerr "Please install npm or yarn to install code-server!"
|
421 | 432 | echoerr "You will need at least node v12 and a few C dependencies."
|
422 |
| - echoerr "See the docs https://github.com/cdr/code-server/blob/v3.10.2/docs/install.md#yarn-npm" |
| 433 | + echoerr "See the docs https://coder.com/docs/code-server/v3.10.2/install#yarn-npm" |
423 | 434 | exit 1
|
424 | 435 | }
|
425 | 436 |
|
|
0 commit comments