Skip to content

Commit 2d2259a

Browse files
committed
Documentation fixes
1 parent 417b4b4 commit 2d2259a

File tree

7 files changed

+74
-46
lines changed

7 files changed

+74
-46
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22

33
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
44

5+
![Screenshot](./doc/assets/screenshot.png)
6+
7+
## Highlights
8+
59
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
610
consistent dev environment. Develop on a Linux machine and pick up from any
711
device with a web browser.
812
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
913
Preserve battery life when you're on the go since all intensive tasks runs on your server.
1014
Make use of a spare computer you have lying around and turn it into a full development environment.
1115

12-
![Example gif](./doc/assets/screenshot.png)
13-
1416
## Getting Started
1517

1618
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
1719

18-
## Install
19-
20-
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
20+
[We have a script](./install.sh) to install code-server for Linux or macOS.
21+
It tries to use the system package manager if possible.
2122

2223
First run to print out the install process:
2324

@@ -31,7 +32,9 @@ Now to actually install:
3132
curl -fsSL https://code-server.dev/install.sh | sh
3233
```
3334

34-
Docs on the install script, manual installation and docker instructions are at [./doc/install.md](./doc/install.md).
35+
The install script will print out how to run and start using code-server.
36+
37+
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
3538

3639
## FAQ
3740

ci/build/build-packages.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ main() {
1111
mkdir -p release-packages
1212

1313
release_archive
14-
if [[ $OS == linux && $ARCH == "amd64" ]]; then
15-
# Will stop most of the auto update issues.
16-
# For the other releases it's more important to not pollute the release listing.
17-
ARCH=x86_64 release_archive
14+
# Will stop the auto update issues and allow people to upgrade their scripts
15+
# for the new release structure.
16+
if [[ $ARCH == "amd64" ]]; then
17+
if [[ $OS == "linux" ]]; then
18+
ARCH=x86_64 release_archive
19+
elif [[ $OS == "macos" ]]; then
20+
OS=darwin ARCH=x86_64 release_archive
21+
fi
1822
fi
1923

2024
if [[ $OSTYPE == linux* ]]; then

ci/build/code-server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ bin_dir() {
1717
}
1818

1919
BIN_DIR=$(bin_dir)
20-
if [ "$(uname)" = "Linux"]; then
20+
if [ "$(uname)" = "Linux" ]; then
2121
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
2222
else
23-
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
23+
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}"
2424
fi
2525
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"

doc/FAQ.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [Heartbeat File](#heartbeat-file)
2020
- [How does the config file work?](#how-does-the-config-file-work)
2121
- [Blank screen on iPad?](#blank-screen-on-ipad)
22+
- [Isn't an install script insecure?](#isnt-an-install-script-insecure)
2223
- [Enterprise](#enterprise)
2324

2425
<!-- 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.
242243

243244
See [#1566](https://github.com/cdr/code-server/issues/1566#issuecomment-623159434).
244245

246+
## Isn't an install script insecure?
247+
248+
Please give
249+
[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by
250+
[sandstorm.io](https://sandstorm.io) a read.
251+
245252
## Enterprise
246253

247254
Visit [our enterprise page](https://coder.com) for more information about our

doc/guide.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ to avoid the slow dashboard.
7777

7878
## 2. Install code-server
7979

80-
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
80+
[We have a script](./install.sh) to install code-server for Linux or macOS.
81+
It tries to use the system package manager if possible.
8182

8283
First run to print out the install process:
8384

@@ -91,7 +92,9 @@ Now to actually install:
9192
curl -fsSL https://code-server.dev/install.sh | sh
9293
```
9394

94-
Docs on the install script, manual installation and docker instructions are at [./doc/install.md](./doc/install.md).
95+
The install script will print out how to run and start using code-server.
96+
97+
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
9598

9699
## 3. Expose code-server
97100

doc/install.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,10 @@
1616
This document demonstrates how to install `code-server` on
1717
various distros and operating systems.
1818

19-
The steps in this document are exactly what the install script does.
20-
21-
We recommend using the install script if possible. You can run
22-
the install script with the `--dry-run` flag for a dry run which will
23-
print out the commands it will run to install `code-server` but
24-
not run anything. That way you can verify the script is functioning
25-
as intended before installing.
26-
2719
## install.sh
2820

29-
We have a script to install code-server on Linux or macOS preferring to use the system package manager.
21+
[We have a script](./install.sh) to install code-server for Linux or macOS.
22+
It tries to use the system package manager if possible.
3023

3124
First run to print out the install process:
3225

@@ -40,28 +33,40 @@ Now to actually install:
4033
curl -fsSL https://code-server.dev/install.sh | sh
4134
```
4235

43-
- For Debian, Ubuntu, Raspbian it will install the latest deb package.
44-
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
36+
The script will print out how to run and start using code-server.
37+
38+
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
39+
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
4540
- For Arch Linux it will install the AUR package.
46-
- For any unrecognized Linux operating system it will install the latest static release into ~/.local
41+
- For any unrecognized Linux operating system it will install the latest static release into `~/.local`
4742

48-
- Add ~/.local/bin to your \$PATH to run code-server.
43+
- Add `~/.local/bin` to your `$PATH` to run code-server.
4944

5045
- For macOS it will install the Homebrew package.
5146

52-
- If Homebrew is not installed it will install the latest static release into ~/.local
47+
- If Homebrew is not installed it will install the latest static release into `~/.local`
5348
- Add ~/.local/bin to your \$PATH to run code-server.
5449

55-
- If ran on an architecture with no binary releases, it will install the npm package with yarn or npm.
50+
- If ran on an architecture with no binary releases, it will install the npm package with `yarn` or `npm`.
5651
- We only have binary releases for amd64 and arm64 presently.
5752

53+
Pass `--dry-run` to echo the commands for the install process without running them.
54+
5855
Pass `--static` to install a static release into `~/.local`.
56+
5957
Pass `--static=/usr/local` to install a static release system wide.
58+
6059
Pass `--version=X.X.X` to install version `X.X.X` instead of latest.
6160

62-
If you still don't trust our install script, even with the above explaination and the dry run,
63-
continue for docs on manual installation. The script runs the exact same commands depicted
64-
in the rest of this document.
61+
Pass `--help` to see full usage docs.
62+
63+
If you believe an install script used via curl is insecure, please give
64+
[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by
65+
[sandstorm.io](https://sandstorm.io) a read.
66+
67+
If you'd still prefer manual installation despite the above explanations and `--dry-run`
68+
then continue for docs on manual installation. The [`install.sh`](./install.sh) script runs the *exact* same
69+
commands depicted in the rest of this document.
6570

6671
## Debian, Ubuntu
6772

install.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,44 @@ EOF
1717
"
1818
fi
1919
cat << EOF
20-
Installs the latest code-server on Linux or macOS preferring to use the system package manager.
20+
Installs code-server for Linux or macOS.
21+
It tries to use the system package manager if possible.
22+
After successful installation it explains how to start using code-server.
2123
2224
Usage:
2325
2426
$cli [--dry-run] [--version X.X.X] [--static <install-prefix>=~/.local]
2527
${curl_usage-}
26-
- For Debian, Ubuntu, Raspbian it will install the latest deb package.
27-
- For Fedora, CentOS, RHEL, openSUSE it will install the latest rpm package.
28+
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
29+
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
2830
- For Arch Linux it will install the AUR package.
29-
- For any unrecognized Linux operating system it will install the latest static release into ~/.local
31+
- For any unrecognized Linux operating system it will install the latest static
32+
release into ~/.local
3033
- Add ~/.local/bin to your \$PATH to run code-server.
3134
3235
- For macOS it will install the Homebrew package.
33-
- If Homebrew is not installed it will install the latest static release into ~/.local
36+
- If Homebrew is not installed it will install the latest static release
37+
into ~/.local
3438
- Add ~/.local/bin to your \$PATH to run code-server.
3539
36-
- If ran on an architecture with no binary releases, it will install the npm package with yarn or npm.
40+
- If ran on an architecture with no binary releases, it will install the
41+
npm package with yarn or npm.
3742
- We only have binary releases for amd64 and arm64 presently.
3843
39-
--dry-run Enables a dry run where where the steps that would have taken place
40-
are printed but do not actually execute.
44+
--dry-run Echo the commands for the install process without running them.
4145
42-
--version Pass to install a specific version instead of the latest release.
46+
--version Install a specific version instead of the latest release.
4347
44-
--static Forces the installation of a static release into ~/.local
48+
--static Install a static release into ~/.local
4549
46-
This flag takes an optional argument for the installation prefix which defaults to "~/.local".
47-
code-server will be unarchived into ~/.local/lib/code-server.X.X.X and the binary will be symlinked
48-
into "~/.local/bin/code-server". You will need to add ~/.local/bin to your \$PATH to use it without
50+
code-server will be unarchived into ~/.local/lib/code-server.X.X.X
51+
and the binary will be symlinked into ~/.local/bin/code-server.
52+
You will need to add ~/.local/bin to your \$PATH to use it without
4953
the full path.
5054
5155
To install system wide set the prefix to /usr/local.
56+
57+
https://github.com/cdr/code-server/blob/master/doc/install.md
5258
EOF
5359
}
5460

@@ -63,6 +69,7 @@ echo_static_postinstall() {
6369
echo
6470
cat << EOF
6571
Static release has been installed into $STATIC_INSTALL_PREFIX/lib/code-server-$VERSION
72+
6673
Please extend your path to use code-server:
6774
PATH="$STATIC_INSTALL_PREFIX/bin:\$PATH"
6875
Then you can run:
@@ -176,7 +183,6 @@ main() {
176183
*)
177184
install_static
178185
;;
179-
180186
esac
181187
}
182188

0 commit comments

Comments
 (0)