#!/usr/bin/env bash set -euxo pipefail latest_release() { curl -sSL "https://api.github.com/repos/$1/releases/latest" | jq -r .tag_name } pushd /tmp export DEBIAN_FRONTEND=noninteractive dpkg --add-architecture i386 apt-get update (yes || true) | unminimize apt-get install -y curl gnupg lsb-release # Ceylon curl -fsSL https://downloads.ceylon-lang.org/apt/ceylon-debian-repo.gpg.key | apt-key add - # Crystal curl -fsSL https://keybase.io/crystal/pgp_keys.asc | apt-key add - # Dart curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - # Hack apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B4112585D386EB94 # Node.js curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - # R apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 # Yarn curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - ubuntu_ver="$(lsb_release -rs)" ubuntu_name="$(lsb_release -cs)" cran_repo="$(curl -fsSL https://cran.r-project.org/bin/linux/ubuntu/ | grep '' | grep "${ubuntu_name}" | grep -Eo 'cran[0-9]+' | head -n1)" node_repo="$(curl -fsSL 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 mkdir -p /opt/riju/langs touch /opt/riju/langs/.keep popd rm "$0"