#!/bin/sh
# Bundled dsh CLI for the RatioMax harness package.
# Runs the package's own runtime against the package's own DSH home, so it works
# on a machine without Node.js or a global dsh install.
set -eu
APP_DIR="$(cd "$(dirname "$(readlink -f "$0")")/.." && pwd)"
DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/ratiomax-harness"
DSH_HOME="${DSH_HOME:-$DATA_HOME/dsh-home}"
mkdir -p "$DSH_HOME"
export DSH_HOME
exec "$APP_DIR/runtime/node" "$APP_DIR/runtime/lib/bin.js" "$@"
