Skip to content

Commit bf9f6d5

Browse files
committed
Resolve sibling turtle-agentctl in cloudfog bridge
1 parent f811373 commit bf9f6d5

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

assets/sourceos/bin/turtle-cloudfog

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22
# TurtleTerm CloudFog surface bridge.
33
set -eu
44

5+
bin_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
6+
agentctl="$bin_dir/turtle-agentctl"
7+
if [ ! -x "$agentctl" ]; then
8+
agentctl="turtle-agentctl"
9+
fi
10+
511
cmd="${1:-surfaces}"
612
case "$cmd" in
713
surfaces)
814
shift || true
9-
exec turtle-agentctl --stdio cloudfog-surfaces "$@"
15+
exec "$agentctl" --stdio cloudfog-surfaces "$@"
1016
;;
1117
inspect)
1218
shift || true
13-
exec turtle-agentctl --stdio cloudfog-inspect "$@"
19+
exec "$agentctl" --stdio cloudfog-inspect "$@"
1420
;;
1521
request-execution)
1622
shift || true
1723
surface="${1:-cloudfog/local-devshell}"
1824
shift || true
19-
exec turtle-agentctl --stdio request-surface-execution "$surface" "$@"
25+
exec "$agentctl" --stdio request-surface-execution "$surface" "$@"
2026
;;
2127
*)
2228
echo "usage: turtle-cloudfog [surfaces|inspect <surface>|request-execution <surface> -- <command>]" >&2

0 commit comments

Comments
 (0)