77usage () {
88 arg0=" $0 "
99 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 --"
1111 else
1212 not_curl_usage=" The latest script is available at https://code-server.dev/install.sh
1313"
@@ -17,27 +17,44 @@ usage() {
1717Installs code-server for Linux, macOS and FreeBSD.
1818It tries to use the system package manager if possible.
1919After 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.
2028${not_curl_usage-}
2129Usage:
2230
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]
2432
2533 --dry-run
2634 Echo the commands for the install process without running them.
35+
2736 --version X.X.X
2837 Install a specific version instead of the latest.
38+
2939 --method [detect | standalone]
3040 Choose the installation method. Defaults to detect.
3141 - detect detects the system package manager and tries to use it.
3242 Full reference on the process is further below.
3343 - standalone installs a standalone release archive into ~/.local
3444 Add ~/.local/bin to your \$ PATH to use it.
45+
3546 --prefix <dir>
3647 Sets the prefix used by standalone release archives. Defaults to ~/.local
3748 The release is unarchived into ~/.local/lib/code-server-X.X.X
3849 and the binary symlinked into ~/.local/bin/code-server
3950 To install system wide pass ---prefix=/usr/local
4051
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+
4158- For Debian, Ubuntu and Raspbian it will install the latest deb package.
4259- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
4360- For Arch Linux it will install the AUR package.
5673 - The npm package builds the native modules on postinstall.
5774
5875It 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.
5978
6079More installation docs are at https://github.com/cdr/code-server/blob/master/doc/install.md
6180EOF
0 commit comments