-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (25 loc) · 719 Bytes
/
Copy pathinstall.sh
File metadata and controls
30 lines (25 loc) · 719 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
#!/usr/bin/env bash
# Install git-bash-opencode-plugin (global OpenCode plugin)
# Usage:
# bash install.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
run_node_script() {
local script="$1"
if command -v node >/dev/null 2>&1; then
node "$script"
elif command -v bun >/dev/null 2>&1; then
bun run "$script"
else
echo "Node.js or Bun is required." >&2
exit 1
fi
}
echo "git-bash-opencode-plugin installer"
echo "==================================="
echo ""
echo "Installing global OpenCode plugin..."
run_node_script "$ROOT/scripts/install-global.mjs"
echo ""
echo "Done! Restart OpenCode to activate the plugin."
echo 'Verify: opencode run "call bashInfo and show the result"'