agent-joule/script/freebsd
David Charlot a084434e14 Baseline: hard fork of zed@e2e7a67
Fork point for agent-zed. Editor core retained; AI/telemetry/cloud layers
to be ripped and replaced per FORK_MAP.md.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-05-30 08:20:23 -04:00

35 lines
783 B
Shell
Executable file

#!/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
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 0
fi