#!/bin/sh
set -eu

self_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
self_repo=$(CDPATH= cd -- "$self_dir/.." && pwd)
repo=${UNIDESK_REPO_ROOT:-$self_repo}
if [ ! -f "$repo/scripts/cli.ts" ]; then repo=/root/unidesk; fi

exec bun "$repo/scripts/cli.ts" "$@"
