#!/usr/bin/env bash set -euxo pipefail latest_release() { curl -sSL "https://api.github.com/repos/$1/releases/latest" | jq -r .tag_name } mkdir /tmp/riju-work pushd /tmp/riju-work export DEBIAN_FRONTEND=noninteractive apt-get update apt-get dist-upgrade -y (yes || true) | unminimize apt-get install -y curl gnupg lsb-release wget curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - ubuntu_name="$(lsb_release -cs)" node_repo="$(curl -sS https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" tee -a /etc/apt/sources.list.d/custom.list >/dev/null </dev/null <<"EOF" %sudo ALL=(ALL:ALL) NOPASSWD: ALL EOF popd rm -rf /tmp/riju-work rm "$0"