Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e8b1b8

Browse files
committed
Add auto install script
1 parent 42df659 commit 4e8b1b8

File tree

9 files changed

+376
-28
lines changed

9 files changed

+376
-28
lines changed

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
1818
### Debian, Ubuntu
1919

2020
```bash
21-
curl -OL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
21+
curl -fOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
2222
sudo dpkg -i code-server_3.3.1_amd64.deb
2323
systemctl --user enable --now code-server
2424
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
@@ -27,7 +27,7 @@ systemctl --user enable --now code-server
2727
### Fedora, CentOS, Red Hat, SUSE
2828

2929
```bash
30-
curl -OL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
30+
curl -fOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
3131
sudo rpm -i code-server-3.3.1-amd64.rpm
3232
systemctl --user enable --now code-server
3333
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
@@ -102,10 +102,10 @@ Add the code-server `bin` directory to your `$PATH` to easily execute `code-serv
102102
Here is an example script for installing and using a static `code-server` release on Linux:
103103

104104
```bash
105-
curl -L https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
106-
| sudo tar -C /usr/local -xz
107-
sudo mv /usr/local/code-server-3.3.1-linux-amd64 /usr/local/code-server-3.3.1
108-
PATH="/usr/local/code-server-3.3.1/bin:$PATH"
105+
curl -fL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
106+
| sudo tar -C /usr/local/lib -xz
107+
sudo mv /usr/local/lib/code-server-3.3.1-linux-amd64 /usr/local/lib/code-server-3.3.1
108+
PATH="/usr/local/lib/code-server-3.3.1/bin:$PATH"
109109
code-server
110110
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
111111
```

‎ci/README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Any file or directory in this subdirectory should be documented here.
1414

1515
Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) installed.
1616

17-
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and make a PR.
17+
1. Update the version of code-server and make a PR.
18+
1. Update in `package.json`
19+
2. [README.md](../README.md) and [guide.md](../doc/guide.md) install examples
20+
3. [install.sh](../install.sh)
1821
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
1922
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
2023
the updated version.

‎ci/container/Dockerfile‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ RUN apt-get update
66
RUN apt-get install -y curl gnupg
77

88
# Installs node.
9-
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - && \
9+
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
1010
apt-get install -y nodejs
1111

1212
# Installs yarn.
13-
RUN curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
13+
RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
1414
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
1515
apt-get update && apt-get install -y yarn
1616

@@ -28,23 +28,23 @@ RUN apt-get install -y git rsync unzip
2828

2929
# We need latest jq from debian buster for date support.
3030
RUN ARCH="$(dpkg --print-architecture)" && \
31-
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
31+
curl -fsSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
3232
dpkg -i libonig*.deb && \
33-
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
33+
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
3434
dpkg -i libjq*.deb && \
35-
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
35+
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
3636
dpkg -i jq*.deb && rm *.deb
3737

3838
# Installs shellcheck.
3939
# Unfortunately coredumps on debian:8 so disabled for now.
40-
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
40+
#RUN curl -fsSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
4141
# tar -xJ && \
4242
# mv shellcheck*/shellcheck /usr/local/bin && \
4343
# rm -R shellcheck*
4444

4545
# Install Go dependencies
4646
RUN ARCH="$(dpkg --print-architecture)" && \
47-
curl -sSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
47+
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
4848
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
4949
ENV GO111MODULE=on
5050
RUN go get mvdan.cc/sh/v3/cmd/shfmt

‎ci/container/arm64/Dockerfile‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ RUN apt-get update
66
RUN apt-get install -y curl gnupg
77

88
# Installs node.
9-
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - && \
9+
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
1010
apt-get install -y nodejs
1111

1212
# Installs yarn.
13-
RUN curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
13+
RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
1414
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
1515
apt-get update && apt-get install -y yarn
1616

@@ -24,27 +24,27 @@ RUN apt-get install -y build-essential \
2424
RUN apt-get install -y gettext-base
2525

2626
# Misc build dependencies.
27-
RUN apt-get install -y git rsync
27+
RUN apt-get install -y git rsync unzip
2828

2929
# We need latest jq from debian buster for date support.
3030
RUN ARCH="$(dpkg --print-architecture)" && \
31-
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
31+
curl -fsSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
3232
dpkg -i libonig*.deb && \
33-
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
33+
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
3434
dpkg -i libjq*.deb && \
35-
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
35+
curl -fsSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
3636
dpkg -i jq*.deb && rm *.deb
3737

3838
# Installs shellcheck.
3939
# Unfortunately coredumps on debian:8 so disabled for now.
40-
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
40+
#RUN curl -fsSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
4141
# tar -xJ && \
4242
# mv shellcheck*/shellcheck /usr/local/bin && \
4343
# rm -R shellcheck*
4444

4545
# Install Go dependencies
4646
RUN ARCH="$(dpkg --print-architecture)" && \
47-
curl -sSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
47+
curl -fsSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
4848
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
4949
ENV GO111MODULE=on
5050
RUN go get mvdan.cc/sh/v3/cmd/shfmt

‎ci/dev/lint.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ main() {
99
tsc --noEmit
1010
# See comment in ./ci/container/Dockerfile
1111
if [[ ! ${CI-} ]]; then
12-
shellcheck -e SC2046,SC2164,SC2154 $(git ls-files "*.sh")
12+
shellcheck -e SC2046,SC2164,SC2154,SC1091 $(git ls-files "*.sh")
1313
fi
1414
}
1515

‎ci/lib.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ curl() {
5656
# This will contain the artifacts we want.
5757
# https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs
5858
get_artifacts_url() {
59-
curl -sSL 'https://api.github.com/repos/cdr/code-server/actions/workflows/ci.yaml/runs?status=success&event=push' | jq -r ".workflow_runs[] | select(.head_sha == \"$(git rev-parse HEAD)\") | .artifacts_url" | head -n 1
59+
curl -fsSL 'https://api.github.com/repos/cdr/code-server/actions/workflows/ci.yaml/runs?status=success&event=push' | jq -r ".workflow_runs[] | select(.head_sha == \"$(git rev-parse HEAD)\") | .artifacts_url" | head -n 1
6060
}
6161

6262
# Grabs the artifact's download url.
6363
# https://developer.github.com/v3/actions/artifacts/#list-workflow-run-artifacts
6464
get_artifact_url() {
6565
local artifact_name="1ドル"
66-
curl -sSL "$(get_artifacts_url)" | jq -r ".artifacts[] | select(.name == \"$artifact_name\") | .archive_download_url" | head -n 1
66+
curl -fsSL "$(get_artifacts_url)" | jq -r ".artifacts[] | select(.name == \"$artifact_name\") | .archive_download_url" | head -n 1
6767
}
6868

6969
# Uses the above two functions to download a artifact into a directory.
@@ -74,7 +74,7 @@ download_artifact() {
7474
local tmp_file
7575
tmp_file="$(mktemp)"
7676

77-
curl -sSL "$(get_artifact_url "$artifact_name")" > "$tmp_file"
77+
curl -fsSL "$(get_artifact_url "$artifact_name")" > "$tmp_file"
7878
unzip -q -o "$tmp_file" -d "$dst"
7979
rm "$tmp_file"
8080
}

‎ci/release-container/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN adduser --gecos '' --disabled-password coder && \
2828
echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
2929

3030
RUN ARCH="$(dpkg --print-architecture)" && \
31-
curl -sSL "https://github.com/boxboat/fixuid/releases/download/v0.4.1/fixuid-0.4.1-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - && \
31+
curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.4.1/fixuid-0.4.1-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - && \
3232
chown root:root /usr/local/bin/fixuid && \
3333
chmod 4755 /usr/local/bin/fixuid && \
3434
mkdir -p /etc/fixuid && \

‎doc/guide.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ SSH into your instance and run the appropriate commands documented in [README.md
8282
Assuming Debian:
8383

8484
```bash
85-
curl -OL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
85+
curl -fOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
8686
sudo dpkg -i code-server_3.3.1_amd64.deb
8787
systemctl --user enable --now code-server
8888
# Now code-server is running at http://127.0.0.1:8080

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /