llm
Download
19 lines 646 BBashModified 2026-08-30executable raw
12345678910111213141516171819
#!/bin/sh
# Run the locally built tomo (building it first if needed). Works from any
# working directory: the repository root is derived from this script's path.
repo="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)"
# Normalize uname to Zig platform keys (Darwin/arm64/amd64 etc.):
case "$(uname -s)" in
    Darwin) os=macos ;;
    *) os=$(uname -s | tr '[:upper:]' '[:lower:]') ;;
esac
case "$(uname -m)" in
    arm64) arch=aarch64 ;;
    amd64) arch=x86_64 ;;
    *) arch=$(uname -m) ;;
esac
platform="$arch-$os"
if ! [ -e "$repo/build/$platform/tomo/bin/tomo" ]; then
    make -C "$repo" -j
fi
exec "$repo/build/$platform/tomo/bin/tomo" "$@"