-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfusion
More file actions
executable file
·20 lines (17 loc) · 906 Bytes
/
Copy pathfusion
File metadata and controls
executable file
·20 lines (17 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# fusion — launch pi with disler/fusion-harness from any directory.
#
# usage: fusion [pi args...]
# FH_CONFIG=/path/to/stack.yaml fusion # override the model stack
#
# Extension lives in the vendored submodule; stack YAMLs live in
# pi/fusion-stacks/ (ours, not the submodule's — updates never clobber them).
set -euo pipefail
DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
FH="$DIR/vendor/fusion-harness"
EXT="$FH/extensions/fusion-harness/fusion-harness.ts"
CONFIG="${FH_CONFIG:-$DIR/pi/fusion-stacks/default.yaml}"
[ -f "$EXT" ] || { echo "fusion-harness not found: $EXT (run: git -C $DIR submodule update --init)" >&2; exit 1; }
[ -f "$CONFIG" ] || { echo "stack config not found: $CONFIG" >&2; exit 1; }
[ -d "$FH/node_modules" ] || { echo "deps missing; run: npm install --prefix $FH" >&2; exit 1; }
exec pi -e "$EXT" --fh-config "$CONFIG" "$@"