35 lines · 783 B · Text
RawDownload
#!/usr/bin/env bash set -xeuo pipefail # if root or if sudo/unavailable, define an empty variableif [ "$(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    echo "Finished installing FreeBSD dependencies with script/freebsd"} # FreeBSD# https://www.freebsd.org/ports/pkg=$(command -v pkg || true)if [[ -n $pkg ]]; then    deps=(        cmake        gcc        git        llvm        protobuf        rustup-init        libx11        alsa-lib    )    $maysudo "$pkg" install "${deps[@]}"    finalize    exit 0fi

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t