Skip to content

Commit

Permalink
install.sh: Update --help docs to reflect remote installation
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Aug 28, 2020
1 parent 13ce1a6 commit bcf032e
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -eu
usage() {
arg0="$0"
if [ "$0" = sh ]; then
arg0="curl -fsSL https://code-server.dev/install.sh | sh -s -- [user@host]"
arg0="curl -fsSL https://code-server.dev/install.sh | sh -s --"
else
not_curl_usage="The latest script is available at https://code-server.dev/install.sh
"
Expand All @@ -17,27 +17,44 @@ usage() {
Installs code-server for Linux, macOS and FreeBSD.
It tries to use the system package manager if possible.
After successful installation it explains how to start using code-server.
Pass --start to startup code-server immediately, print the URL it can be
accessed at and the initial password. Then the script will tail code-server's logs.
Pass in user@host to install code-server on user@host over ssh.
Pass --start to forward the code-server port so that you can immediately access it.
If you rerun the script, code-server will be updated only as required.
${not_curl_usage-}
Usage:
$arg0 [--dry-run] [--version X.X.X] [--method detect] [--prefix ~/.local] [user@host]
$arg0 [--dry-run] [--version X.X.X] [--method detect] [--prefix ~/.local] [--start] [user@host]
--dry-run
Echo the commands for the install process without running them.
--version X.X.X
Install a specific version instead of the latest.
--method [detect | standalone]
Choose the installation method. Defaults to detect.
- detect detects the system package manager and tries to use it.
Full reference on the process is further below.
- standalone installs a standalone release archive into ~/.local
Add ~/.local/bin to your \$PATH to use it.
--prefix <dir>
Sets the prefix used by standalone release archives. Defaults to ~/.local
The release is unarchived into ~/.local/lib/code-server-X.X.X
and the binary symlinked into ~/.local/bin/code-server
To install system wide pass ---prefix=/usr/local
--start
Ensures code-server is running and prints the URL at which it can be accessed.
Also will print code-server's password and when installing over ssh, will forward
the code-server port so that it can be easily accessed locally.
Will block on tailing code-server's logs.
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package.
Expand All @@ -56,6 +73,8 @@ Usage:
- The npm package builds the native modules on postinstall.
It will cache all downloaded assets into ~/.cache/code-server
With ssh installation, assets will be transferred over via scp
as needed instead of being downloaded directly on the ssh host.
More installation docs are at https://github.com/cdr/code-server/blob/master/doc/install.md
EOF
Expand Down

0 comments on commit bcf032e

Please sign in to comment.