Documentation fixes

This commit is contained in:
Anmol Sethi 2020-05-21 22:16:16 -04:00
parent 15cd727b96
commit 7dcfde7329
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
7 changed files with 75 additions and 47 deletions

View File

@ -2,6 +2,10 @@
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
![Screenshot](./doc/assets/screenshot.png)
## Highlights
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a - **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
consistent dev environment. Develop on a Linux machine and pick up from any consistent dev environment. Develop on a Linux machine and pick up from any
device with a web browser. device with a web browser.
@ -9,15 +13,12 @@ Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and a
Preserve battery life when you're on the go since all intensive tasks runs on your server. Preserve battery life when you're on the go since all intensive tasks runs on your server.
Make use of a spare computer you have lying around and turn it into a full development environment. Make use of a spare computer you have lying around and turn it into a full development environment.
![Example gif](./doc/assets/screenshot.png)
## Getting Started ## Getting Started
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md). For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
## Install [We have a script](./install.sh) to install code-server for Linux or macOS.
It tries to use the system package manager if possible.
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
First run to print out the install process: First run to print out the install process:
@ -31,7 +32,9 @@ Now to actually install:
curl -fsSL https://code-server.dev/install.sh | sh curl -fsSL https://code-server.dev/install.sh | sh
``` ```
Docs on the install script, manual installation and docker instructions are at [./doc/install.md](./doc/install.md). The install script will print out how to run and start using code-server.
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
## FAQ ## FAQ

View File

@ -11,10 +11,14 @@ main() {
mkdir -p release-packages mkdir -p release-packages
release_archive release_archive
if [[ $OS == linux && $ARCH == "amd64" ]]; then # Will stop the auto update issues and allow people to upgrade their scripts
# Will stop most of the auto update issues. # for the new release structure.
# For the other releases it's more important to not pollute the release listing. if [[ $ARCH == "amd64" ]]; then
ARCH=x86_64 release_archive if [[ $OS == "linux" ]]; then
ARCH=x86_64 release_archive
elif [[ $OS == "macos" ]]; then
OS=darwin ARCH=x86_64 release_archive
fi
fi fi
if [[ $OSTYPE == linux* ]]; then if [[ $OSTYPE == linux* ]]; then

View File

@ -17,9 +17,9 @@ bin_dir() {
} }
BIN_DIR=$(bin_dir) BIN_DIR=$(bin_dir)
if [ "$(uname)" = "Linux"]; then if [ "$(uname)" = "Linux" ]; then
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
else else
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}" export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}"
fi fi
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@" exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"

View File

@ -19,6 +19,7 @@
- [Heartbeat File](#heartbeat-file) - [Heartbeat File](#heartbeat-file)
- [How does the config file work?](#how-does-the-config-file-work) - [How does the config file work?](#how-does-the-config-file-work)
- [Blank screen on iPad?](#blank-screen-on-ipad) - [Blank screen on iPad?](#blank-screen-on-ipad)
- [Isn't an install script insecure?](#isnt-an-install-script-insecure)
- [Enterprise](#enterprise) - [Enterprise](#enterprise)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
@ -242,6 +243,12 @@ certificate using the CA and then import the CA onto your iPad.
See [#1566](https://github.com/cdr/code-server/issues/1566#issuecomment-623159434). See [#1566](https://github.com/cdr/code-server/issues/1566#issuecomment-623159434).
## Isn't an install script insecure?
Please give
[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by
[sandstorm.io](https://sandstorm.io) a read.
## Enterprise ## Enterprise
Visit [our enterprise page](https://coder.com) for more information about our Visit [our enterprise page](https://coder.com) for more information about our

View File

@ -77,7 +77,8 @@ to avoid the slow dashboard.
## 2. Install code-server ## 2. Install code-server
We have a script to install code-server on Linux or macOS preferring to use the system package manager. [We have a script](./install.sh) to install code-server for Linux or macOS.
It tries to use the system package manager if possible.
First run to print out the install process: First run to print out the install process:
@ -91,7 +92,9 @@ Now to actually install:
curl -fsSL https://code-server.dev/install.sh | sh curl -fsSL https://code-server.dev/install.sh | sh
``` ```
Docs on the install script, manual installation and docker instructions are at [./doc/install.md](./doc/install.md). The install script will print out how to run and start using code-server.
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
## 3. Expose code-server ## 3. Expose code-server

View File

@ -16,17 +16,10 @@
This document demonstrates how to install `code-server` on This document demonstrates how to install `code-server` on
various distros and operating systems. various distros and operating systems.
The steps in this document are exactly what the install script does.
We recommend using the install script if possible. You can run
the install script with the `--dry-run` flag for a dry run which will
print out the commands it will run to install `code-server` but
not run anything. That way you can verify the script is functioning
as intended before installing.
## install.sh ## install.sh
We have a script to install code-server on Linux or macOS preferring to use the system package manager. [We have a script](./install.sh) to install code-server for Linux or macOS.
It tries to use the system package manager if possible.
First run to print out the install process: First run to print out the install process:
@ -40,28 +33,40 @@ Now to actually install:
curl -fsSL https://code-server.dev/install.sh | sh curl -fsSL https://code-server.dev/install.sh | sh
``` ```
- For Debian, Ubuntu, Raspbian it will install the latest deb package. The script will print out how to run and start using code-server.
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package.
- For any unrecognized Linux operating system it will install the latest static release into ~/.local
- Add ~/.local/bin to your \$PATH to run code-server. - 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.
- For any unrecognized Linux operating system it will install the latest static release into `~/.local`
- Add `~/.local/bin` to your `$PATH` to run code-server.
- For macOS it will install the Homebrew package. - For macOS it will install the Homebrew package.
- If Homebrew is not installed it will install the latest static release into ~/.local - If Homebrew is not installed it will install the latest static release into `~/.local`
- Add ~/.local/bin to your \$PATH to run code-server. - Add ~/.local/bin to your \$PATH to run code-server.
- If ran on an architecture with no binary releases, it will install the npm package with yarn or npm. - If ran on an architecture with no binary releases, it will install the npm package with `yarn` or `npm`.
- We only have binary releases for amd64 and arm64 presently. - We only have binary releases for amd64 and arm64 presently.
Pass `--dry-run` to echo the commands for the install process without running them.
Pass `--static` to install a static release into `~/.local`. Pass `--static` to install a static release into `~/.local`.
Pass `--static=/usr/local` to install a static release system wide. Pass `--static=/usr/local` to install a static release system wide.
Pass `--version=X.X.X` to install version `X.X.X` instead of latest. Pass `--version=X.X.X` to install version `X.X.X` instead of latest.
If you still don't trust our install script, even with the above explaination and the dry run, Pass `--help` to see full usage docs.
continue for docs on manual installation. The script runs the exact same commands depicted
in the rest of this document. If you believe an install script used via curl is insecure, please give
[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by
[sandstorm.io](https://sandstorm.io) a read.
If you'd still prefer manual installation despite the above explanations and `--dry-run`
then continue for docs on manual installation. The [`install.sh`](./install.sh) script runs the *exact* same
commands depicted in the rest of this document.
## Debian, Ubuntu ## Debian, Ubuntu

View File

@ -17,38 +17,44 @@ EOF
" "
fi fi
cat << EOF cat << EOF
Installs the latest code-server on Linux or macOS preferring to use the system package manager. Installs code-server for Linux or macOS.
It tries to use the system package manager if possible.
After successful installation it explains how to start using code-server.
Usage: Usage:
$cli [--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local] $cli [--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
${curl_usage-} ${curl_usage-}
- For Debian, Ubuntu, Raspbian it will install the latest deb package. - For Debian, Ubuntu and Raspbian it will install the latest deb package.
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package. - For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
- For Arch Linux it will install the AUR package. - For Arch Linux it will install the AUR package.
- For any unrecognized Linux operating system it will install the latest static release into ~/.local - For any unrecognized Linux operating system it will install the latest static
release into ~/.local
- Add ~/.local/bin to your \$PATH to run code-server. - Add ~/.local/bin to your \$PATH to run code-server.
- For macOS it will install the Homebrew package. - For macOS it will install the Homebrew package.
- If Homebrew is not installed it will install the latest static release into ~/.local - If Homebrew is not installed it will install the latest static release
into ~/.local
- Add ~/.local/bin to your \$PATH to run code-server. - Add ~/.local/bin to your \$PATH to run code-server.
- If ran on an architecture with no binary releases, it will install the npm package with yarn or npm. - If ran on an architecture with no binary releases, it will install the
npm package with yarn or npm.
- We only have binary releases for amd64 and arm64 presently. - We only have binary releases for amd64 and arm64 presently.
--dry-run Enables a dry run where where the steps that would have taken place --dry-run Echo the commands for the install process without running them.
are printed but do not actually execute.
--version Pass to install a specific version instead of the latest release. --version Install a specific version instead of the latest release.
--static Forces the installation of a static release into ~/.local --static Install a static release into ~/.local
This flag takes an optional argument for the installation prefix which defaults to "~/.local". code-server will be unarchived into ~/.local/lib/code-server.X.X.X
code-server will be unarchived into ~/.local/lib/code-server.X.X.X and the binary will be symlinked and the binary will be symlinked into ~/.local/bin/code-server.
into "~/.local/bin/code-server". You will need to add ~/.local/bin to your \$PATH to use it without You will need to add ~/.local/bin to your \$PATH to use it without
the full path. the full path.
To install system wide set the prefix to /usr/local. To install system wide set the prefix to /usr/local.
https://github.com/cdr/code-server/blob/master/doc/install.md
EOF EOF
} }
@ -63,6 +69,7 @@ echo_static_postinstall() {
echo echo
cat << EOF cat << EOF
Static release has been installed into $STATIC_INSTALL_PREFIX/lib/code-server-$VERSION Static release has been installed into $STATIC_INSTALL_PREFIX/lib/code-server-$VERSION
Please extend your path to use code-server: Please extend your path to use code-server:
PATH="$STATIC_INSTALL_PREFIX/bin:\$PATH" PATH="$STATIC_INSTALL_PREFIX/bin:\$PATH"
Then you can run: Then you can run:
@ -176,7 +183,6 @@ main() {
*) *)
install_static install_static
;; ;;
esac esac
} }