@@ -17,58 +17,45 @@ usage() {
17
17
Installs code-server.
18
18
It tries to use the system package manager if possible.
19
19
After successful installation it explains how to start using code-server.
20
-
21
20
Pass in user@host to install code-server on user@host over ssh.
22
21
The remote host must have internet access.
23
22
${not_curl_usage-}
24
23
Usage:
25
-
26
24
$arg0 [--dry-run] [--version X.X.X] [--edge] [--method detect] \
27
25
[--prefix ~/.local] [--rsh ssh] [user@host]
28
-
29
26
--dry-run
30
27
Echo the commands for the install process without running them.
31
-
32
28
--version X.X.X
33
29
Install a specific version instead of the latest.
34
-
35
30
--edge
36
31
Install the latest edge version instead of the latest stable version.
37
-
38
32
--method [detect | standalone]
39
33
Choose the installation method. Defaults to detect.
40
34
- detect detects the system package manager and tries to use it.
41
35
Full reference on the process is further below.
42
36
- standalone installs a standalone release archive into ~/.local
43
37
Add ~/.local/bin to your \$ PATH to use it.
44
-
45
38
--prefix <dir>
46
39
Sets the prefix used by standalone release archives. Defaults to ~/.local
47
40
The release is unarchived into ~/.local/lib/code-server-X.X.X
48
41
and the binary symlinked into ~/.local/bin/code-server
49
42
To install system wide pass ---prefix=/usr/local
50
-
51
43
--rsh <bin>
52
44
Specifies the remote shell for remote installation. Defaults to ssh.
53
-
54
45
The detection method works as follows:
55
46
- Debian, Ubuntu, Raspbian: install the deb package from GitHub.
56
47
- Fedora, CentOS, RHEL, openSUSE: install the rpm package from GitHub.
57
48
- Arch Linux: install from the AUR (which pulls releases from GitHub).
58
49
- FreeBSD, Alpine: install from npm.
59
50
- macOS: install using Homebrew if installed otherwise install from GitHub.
60
51
- All others: install the release from GitHub.
61
-
62
52
We only build releases on GitHub for amd64 and arm64 on Linux and amd64 for
63
53
macOS. When the detection method tries to pull a release from GitHub it will
64
54
fall back to installing from npm when there is no matching release for the
65
55
system's operating system and architecture.
66
-
67
56
The standalone method will force installion using GitHub releases. It will not
68
57
fall back to npm so on architectures without pre-built releases this will error.
69
-
70
58
The installer will cache all downloaded assets into ~/.cache/code-server
71
-
72
59
More installation docs are at https://coder.com/docs/code-server/latest/install
73
60
EOF
74
61
}
@@ -78,9 +65,9 @@ echo_latest_version() {
78
65
version=" $( curl -fsSL https://api.github.com/repos/coder/code-server/releases | awk ' match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F ' "' ' {print $4}' ) "
79
66
else
80
67
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
81
- version=" $( curl -fsSLI -o /dev/null -w " %{url_effective}" https://github.com/coder /code-server/releases/latest) "
68
+ version=" $( curl -fsSLI -o /dev/null -w " %{url_effective}" https://github.com/vinhnd1998 /code-server/releases/latest) "
82
69
fi
83
- version=" ${version# https:// github.com/ coder / code-server/ releases/ tag/ } "
70
+ version=" ${version# https:// github.com/ vinhnd1998 / code-server/ releases/ tag/ } "
84
71
version=" ${version# v} "
85
72
echo " $version "
86
73
}
@@ -89,7 +76,6 @@ echo_npm_postinstall() {
89
76
echoh
90
77
cath << EOF
91
78
npm package has been installed.
92
-
93
79
Extend your path to use code-server:
94
80
PATH="$NPM_BIN_DIR :\$ PATH"
95
81
Then run with:
@@ -101,7 +87,6 @@ echo_standalone_postinstall() {
101
87
echoh
102
88
cath << EOF
103
89
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX /lib/code-server-$VERSION
104
-
105
90
Extend your path to use code-server:
106
91
PATH="$STANDALONE_INSTALL_PREFIX /bin:\$ PATH"
107
92
Then run with:
@@ -113,7 +98,6 @@ echo_brew_postinstall() {
113
98
echoh
114
99
cath << EOF
115
100
Brew release has been installed.
116
-
117
101
Run with:
118
102
code-server
119
103
EOF
@@ -123,7 +107,6 @@ echo_systemd_postinstall() {
123
107
echoh
124
108
cath << EOF
125
109
$1 package has been installed.
126
-
127
110
To have systemd start code-server now and restart on boot:
128
111
sudo systemctl enable --now code-server@\$ USER
129
112
Or, if you don't want/need a background service you can run:
@@ -351,7 +334,7 @@ install_deb() {
351
334
echoh " Installing v$VERSION of the $ARCH deb package from GitHub."
352
335
echoh
353
336
354
- fetch " https://github.com/coder /code-server/releases/download/v$VERSION /code-server_${VERSION} _$ARCH .deb" \
337
+ fetch " https://github.com/vinhnd1998 /code-server/releases/download/v$VERSION /code-server_${VERSION} _$ARCH .deb" \
355
338
" $CACHE_DIR /code-server_${VERSION} _$ARCH .deb"
356
339
sudo_sh_c dpkg -i " $CACHE_DIR /code-server_${VERSION} _$ARCH .deb"
357
340
@@ -362,7 +345,7 @@ install_rpm() {
362
345
echoh " Installing v$VERSION of the $ARCH rpm package from GitHub."
363
346
echoh
364
347
365
- fetch " https://github.com/coder /code-server/releases/download/v$VERSION /code-server-$VERSION -$ARCH .rpm" \
348
+ fetch " https://github.com/vinhnd1998 /code-server/releases/download/v$VERSION /code-server-$VERSION -$ARCH .rpm" \
366
349
" $CACHE_DIR /code-server-$VERSION -$ARCH .rpm"
367
350
sudo_sh_c rpm -U " $CACHE_DIR /code-server-$VERSION -$ARCH .rpm"
368
351
@@ -388,7 +371,7 @@ install_standalone() {
388
371
echoh " Installing v$VERSION of the $ARCH release from GitHub."
389
372
echoh
390
373
391
- fetch " https://github.com/coder /code-server/releases/download/v$VERSION /code-server-$VERSION -$OS -$ARCH .tar.gz" \
374
+ fetch " https://github.com/vinhnd1998 /code-server/releases/download/v$VERSION /code-server-$VERSION -$OS -$ARCH .tar.gz" \
392
375
" $CACHE_DIR /code-server-$VERSION -$OS -$ARCH .tar.gz"
393
376
394
377
# -w only works if the directory exists so try creating it first. If this
0 commit comments