Files
2026-07-13 04:04:50 +02:00

25 lines
792 B
Bash
Executable File

#!/bin/sh
set -eu
primary_workspace=${AGENTRUN_WORKSPACE_PATH:-}
case "$primary_workspace" in
/*) ;;
*)
printf '%s\n' '{"ok":false,"failureKind":"tool-unavailable","message":"runner did not provide an absolute primary workspace path","source":"primary-workspace","valuesPrinted":false}' >&2
exit 2
;;
esac
shared_tran="$primary_workspace/scripts/tran"
shared_cli="$primary_workspace/scripts/ssh-cli.ts"
if [ ! -x "$shared_tran" ] || [ ! -f "$shared_cli" ]; then
printf '%s\n' '{"ok":false,"failureKind":"tool-unavailable","message":"primary UniDesk workspace does not provide executable scripts/tran","source":"primary-workspace","valuesPrinted":false}' >&2
exit 2
fi
UNIDESK_TRAN_REPO_ROOT="$primary_workspace"
export UNIDESK_TRAN_REPO_ROOT
exec "$shared_tran" "$@"