aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-debian-dev/bootstrap/setup-code-server.bash
blob: cb9a40755f40ef495a820a7b22d0877fefb03ebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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