#!/bin/sh
#
# Install the Supblot Debian package from http://ci-prod-controller.vm.liw.fi:8080/debian/

set -eu

main() {
	tmp="$(mktemp)"
	curl http://apt.liw.fi/debian/pool/main/a/apt.liw.fi-keyring/apt.liw.fi-keyring_1.5-1_all.deb >"$tmp"
	dpkg -i "$tmp"
	rm -f "$tmp"

	cat >/etc/apt/sources.list.d/subplot.list <<EOF
deb [signed-by=/usr/share/keyrings/apt.liw.fi-keyring.pgp] http://apt.liw.fi/debian unstable main
EOF

	apt-get update
	apt-get install -y --no-remove subplot
}

main
