7
7
usage () {
8
8
arg0=" $0 "
9
9
if [ " $0 " = sh ]; then
10
- arg0=" curl -fsSL https://code-server.dev/install.sh | sh -s -- [user@host] "
10
+ arg0=" curl -fsSL https://code-server.dev/install.sh | sh -s --"
11
11
else
12
12
not_curl_usage=" The latest script is available at https://code-server.dev/install.sh
13
13
"
@@ -17,27 +17,44 @@ usage() {
17
17
Installs code-server for Linux, macOS and FreeBSD.
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
+ Pass --start to startup code-server immediately, print the URL it can be
22
+ accessed at and the initial password. Then the script will tail code-server's logs.
23
+
24
+ Pass in user@host to install code-server on user@host over ssh.
25
+ Pass --start to forward the code-server port so that you can immediately access it.
26
+
27
+ If you rerun the script, code-server will be updated only as required.
20
28
${not_curl_usage-}
21
29
Usage:
22
30
23
- $arg0 [--dry-run] [--version X.X.X] [--method detect] [--prefix ~/.local] [user@host]
31
+ $arg0 [--dry-run] [--version X.X.X] [--method detect] [--prefix ~/.local] [--start] [ user@host]
24
32
25
33
--dry-run
26
34
Echo the commands for the install process without running them.
35
+
27
36
--version X.X.X
28
37
Install a specific version instead of the latest.
38
+
29
39
--method [detect | standalone]
30
40
Choose the installation method. Defaults to detect.
31
41
- detect detects the system package manager and tries to use it.
32
42
Full reference on the process is further below.
33
43
- standalone installs a standalone release archive into ~/.local
34
44
Add ~/.local/bin to your \$ PATH to use it.
45
+
35
46
--prefix <dir>
36
47
Sets the prefix used by standalone release archives. Defaults to ~/.local
37
48
The release is unarchived into ~/.local/lib/code-server-X.X.X
38
49
and the binary symlinked into ~/.local/bin/code-server
39
50
To install system wide pass ---prefix=/usr/local
40
51
52
+ --start
53
+ Ensures code-server is running and prints the URL at which it can be accessed.
54
+ Also will print code-server's password and when installing over ssh, will forward
55
+ the code-server port so that it can be easily accessed locally.
56
+ Will block on tailing code-server's logs.
57
+
41
58
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
42
59
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
43
60
- For Arch Linux it will install the AUR package.
56
73
- The npm package builds the native modules on postinstall.
57
74
58
75
It will cache all downloaded assets into ~/.cache/code-server
76
+ With ssh installation, assets will be transferred over via scp
77
+ as needed instead of being downloaded directly on the ssh host.
59
78
60
79
More installation docs are at https://github.com/cdr/code-server/blob/master/doc/install.md
61
80
EOF
0 commit comments