-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (30 loc) · 859 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·34 lines (30 loc) · 859 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
31
32
33
34
#!/bin/sh
set -eu
ROOT=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
GLOBAL=-g
FORCE=
while [ $# -gt 0 ]; do
case $1 in
--local) GLOBAL= ;;
--force|-f) FORCE=-f ;;
-h|--help)
printf '%s\n' "usage: scripts/install.sh [--local] [--force]" \
" (default: global OpenCode config)" \
"Windows: opencode plugin -g C:\\path\\to\\opencode-guided-learning"
exit 0
;;
*)
printf 'unknown option: %s\n' "$1" >&2
exit 1
;;
esac
shift
done
if ! command -v opencode >/dev/null 2>&1; then
printf 'opencode not found in PATH\n' >&2
exit 1
fi
opencode plugin $GLOBAL $FORCE "$ROOT"
printf '\nRestart OpenCode.\n'
printf 'Optional bundled skills: add "%s/skills" to skills.paths\n' "$ROOT"
printf 'If you previously used a file:///…/src/index.ts entry, remove it to avoid duplicate guidance.\n'