chore: add usdasm fetch helper

This commit is contained in:
scawful
2025-12-22 14:51:38 -05:00
parent 319e903f24
commit 76512daba2
4 changed files with 37 additions and 0 deletions

View File

@@ -2,6 +2,15 @@
This directory contains build automation and maintenance scripts for the YAZE project.
## fetch_usdasm.sh
Fetch the usdasm disassembly on demand (not vendored in the repo).
```bash
scripts/fetch_usdasm.sh
# or: USDASM_DIR=/path/to/usdasm scripts/fetch_usdasm.sh
```
## build_cleaner.py
Automates CMake source list maintenance and header include management with IWYU-style analysis.

20
scripts/fetch_usdasm.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
REPO_URL="${USDASM_REPO_URL:-https://github.com/spannerisms/usdasm.git}"
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
TARGET_DIR="${USDASM_DIR:-$ROOT_DIR/assets/asm/usdasm}"
if [ -d "$TARGET_DIR/.git" ]; then
echo "usdasm already present at $TARGET_DIR"
exit 0
fi
if [ -e "$TARGET_DIR" ]; then
echo "Removing existing path at $TARGET_DIR"
rm -rf "$TARGET_DIR"
fi
mkdir -p "$(dirname "$TARGET_DIR")"
git clone --depth 1 "$REPO_URL" "$TARGET_DIR"
echo "usdasm fetched to $TARGET_DIR"