#!/usr/bin/env bash set -xeuo pipefail # if root or if sudo/unavailable, define an empty variable if [ "$(id -u)" -eq 0 ] then maysudo='' else maysudo="$(command -v sudo || command -v doas || true)" fi function finalize { # after packages install (curl, etc), get the rust toolchain which rustup > /dev/null 2>&1 || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y cat <