ReviewOS

home-lang/home-os

Remove hardcoded /Users/chrisbreuer paths from build scripts

#3
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Context

Several build scripts have hardcoded absolute paths to a single contributor's home directory:

# scripts/build-home-zig.sh
KERNEL_DIR="/Users/chrisbreuer/Code/home-os/kernel"
HOME_DIR="/Users/chrisbreuer/Code/home"

This means the build is broken for every other contributor on first checkout. Nobody but Chris can run these scripts as-is.

Scope

  • Grep scripts/ and kernel/ for /Users/, chrisbreuer, and any other contributor-specific path
  • Replace with portable equivalents:
    • SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" then derive paths from $SCRIPT_DIR/..
    • For the home-lang compiler location, accept HOME_COMPILER env var with a sensible default (e.g. ${HOME_COMPILER:-../home/zig-out/bin/home}) and fail with a clear message if not set
  • Document the env var + expected layout in CONTRIBUTING.md / CLAUDE.md
  • Add a scripts/check-env.sh (or have build.sh do it) that verifies all required tools/paths exist before kicking off a build, with actionable error messages

Verification

  • Clean clone on a non-Chris machine, follow README → build succeeds (or fails with a clear, actionable error, not a broken hardcoded path)

Sign in to comment on this issue.