diff options
author | crupest <crupest@outlook.com> | 2024-08-13 22:45:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-08-14 00:28:53 +0800 |
commit | 8fe3578e17757a50f8285a2759c6b149fe85a0b0 (patch) | |
tree | e066917d00637299b80c9251174d3591ba6d1a81 /docker/debian-dev/bootstrap/setup-code-server.bash | |
parent | 1bca7471d864bf859a6189a87adf92856729ec97 (diff) | |
download | crupest-8fe3578e17757a50f8285a2759c6b149fe85a0b0.tar.gz crupest-8fe3578e17757a50f8285a2759c6b149fe85a0b0.tar.bz2 crupest-8fe3578e17757a50f8285a2759c6b149fe85a0b0.zip |
feat(docker/debian-dev): remove code-server and merge it to debian-dev.
Diffstat (limited to 'docker/debian-dev/bootstrap/setup-code-server.bash')
-rwxr-xr-x | docker/debian-dev/bootstrap/setup-code-server.bash | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docker/debian-dev/bootstrap/setup-code-server.bash b/docker/debian-dev/bootstrap/setup-code-server.bash new file mode 100755 index 0000000..cb9a407 --- /dev/null +++ b/docker/debian-dev/bootstrap/setup-code-server.bash @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +set -e + +. /bootstrap/func.bash + +VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') +url="https://github.com/coder/code-server/releases/download/v${VERSION}/code-server_${VERSION}_amd64.deb" + +curl -sSfOL "$url" +apt install "./code-server_${VERSION}_amd64.deb" +rm "code-server_${VERSION}_amd64.deb" + +append-bash-profile code-server.bash |