#!/usr/bin/env bash set -euo pipefail # NOTE: partially deprecated with the devcontainer.json ... echo "==> Setting up toolchain" # Install rustup if not present if ! command -v rustup &>/dev/null; then echo " Installing rustup..." curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable # shellcheck source=/dev/null source "$HOME/.cargo/env" else echo " rustup already installed, updating..." rustup update stable fi echo "==> Adding wasm32 target" rustup target add wasm32-unknown-unknown echo "==> Installing cargo-generate" if ! cargo generate --version &>/dev/null 2>&1; then cargo install --locked cargo-generate else echo " cargo-generate already installed" fi echo "==> Installing bevy CLI" if ! bevy --version &>/dev/null 2>&1; then cargo install --git https://github.com/TheBevyFlock/bevy_cli \ --tag cli-v0.1.0-alpha.2 \ --locked \ bevy_cli else echo " bevy CLI already installed" fi echo "==> Installing JS dependencies (ATProto auth)" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" (cd "$REPO_ROOT/web" && npm install) echo "==> Fetching terminal fonts" "$REPO_ROOT/scripts/fetch-fonts.sh" echo "" echo "Setup complete. Quick reference:" echo " ./scripts/develop.sh # run web target (localhost:4000)" echo " ./scripts/deploy.sh [--production] # build + deploy web"