Amp-Thread-ID: https://ampcode.com/threads/T-01a02d1c-27fc-7761-9f51-ed97b2dd4e3e Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
|
if ! command -v rustup >/dev/null; then
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
|
fi
|
|
toolchain="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' rust-toolchain.toml)"
|
|
rustup toolchain install "$toolchain" --profile minimal --component rust-src,rustfmt --target wasm32-unknown-unknown
|
|
if ! command -v wasm-pack >/dev/null; then
|
|
cargo install wasm-pack --version 0.15.0 --locked
|
|
fi
|
|
if ! command -v go >/dev/null; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y golang-go
|
|
fi
|
|
if ! command -v git-lfs >/dev/null; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y git-lfs
|
|
fi
|
|
if ! command -v Xvfb >/dev/null || ! command -v magick >/dev/null || ! command -v xauth >/dev/null; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y imagemagick libvulkan1 mesa-vulkan-drivers xauth xvfb
|
|
fi
|
|
git lfs install --local
|
|
git lfs pull --include="docs/public/models/sponza.glb"
|
|
npm ci
|
|
npx agent-browser install
|
|
amp orb services ensure
|