-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_opencode.sh
More file actions
30 lines (26 loc) · 834 Bytes
/
start_opencode.sh
File metadata and controls
30 lines (26 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Debug script for running opencode
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Find opencode binary - try multiple locations
OPENCODE=""
if [ -f "$SCRIPT_DIR/opencode" ]; then
OPENCODE="$SCRIPT_DIR/opencode"
elif [ -f "/usr/local/bin/opencode" ]; then
OPENCODE="/usr/local/bin/opencode"
elif [ -f "$HOME/.local/bin/opencode" ]; then
OPENCODE="$HOME/.local/bin/opencode"
else
echo "Error: opencode binary not found"
echo "Searched in:"
echo " - $SCRIPT_DIR/opencode"
echo " - /usr/local/bin/opencode"
echo " - $HOME/.local/bin/opencode"
exit 1
fi
echo "🚀 Starting opencode for debugging..."
echo "Binary: $OPENCODE"
echo "Arguments: $@"
echo ""
# Run opencode with all provided arguments
exec "$OPENCODE" "$@"