File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ app_info () {
6+ utils:info " AI coding agent, built for the terminal"
7+ }
8+
9+ app_install () {
10+ local version=" ${1:- $(app_version)} "
11+ local package=" ${APP_NAME} -linux-x64.zip"
12+
13+ utils:get_file \
14+ " https://github.com/sst/opencode/releases/download/$version /$package " \
15+ " $SDD_TEMP_DIR /$package "
16+ utils:extract " $SDD_TEMP_DIR /$package "
17+
18+ app_remove
19+
20+ install -vD -m755 " $SDD_TEMP_DIR /$APP_NAME " " $SDD_BIN_DIR /$APP_NAME " >&2
21+ }
22+
23+ app_remove () {
24+ rm -vf " $SDD_BIN_DIR /$APP_NAME " >&2
25+ }
26+
27+ app_version () {
28+ utils:github_latest_release ' sst/opencode'
29+ }
30+
31+ SCRIPT_DIR=" $( readlink -f " $( dirname " ${BASH_SOURCE[0]} " ) " ) "
32+
33+ # shellcheck source=./_utils.sh
34+ source " $SCRIPT_DIR /_utils.sh"
35+
36+ utils:parser " $@ "
You can’t perform that action at this time.
0 commit comments